Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
Added logging for invalid tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
akelad committed Nov 6, 2017
1 parent 4fdca73 commit 9b44643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rasa_core/channels/facebook.py
Expand Up @@ -88,12 +88,14 @@ def hello():
if request.args.get("hub.verify_token") == self.fb_verify:
return request.args.get("hub.challenge")
else:
logger.debug("Failure, invalid token")
return "failure, invalid token"
if request.method == 'POST':

signature = request.headers.get("X-Hub-Signature") or ''
if not validate_hub_signature(self.fb_secret, request.data,
signature):
logger.debug("Fb secret not validated")
return "not validated"

output = request.json
Expand Down

0 comments on commit 9b44643

Please sign in to comment.