Botman: [question] What is the best way tho protect botman Laravel route?

Created on 27 May 2020  路  4Comments  路  Source: botman/botman

  • BotMan Version: 2.0
  • PHP Version: 7.2
  • Messaging Service(s):
  • Cache Driver: Laravel Cache (Redis)

Description:

I have a route like that: http://localhost/chatbot

But it is public and anyone who knows that can try massive attack with POST/GET or try to pass fake params.

There are any way the prevent this?

I thought to create middleware, but what i should to check?

My chatbot response to webdriver and TelegramDriver.

question

All 4 comments

@willsilvano I guess you can change your route to something like /chatbot/{token} and then check if {token} from route params equals to your actual bot token

I agree with @sergiy-petrov
But you have to update the webhook accordingly

@feralheart yeah sure!

@sergiy-petrov Thank you for suggestion. I think is a good idea!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lostertschnig picture lostertschnig  路  3Comments

kenkit picture kenkit  路  5Comments

hossinasaadi picture hossinasaadi  路  4Comments

s4rrow picture s4rrow  路  5Comments

venkataadithan picture venkataadithan  路  5Comments