botmasterai / botmaster-messenger

The Facebook Messenger Botmaster integration
MIT License
15 stars 9 forks source link

Escape needed characters to calculate expectedHash #17

Closed marcel0ll closed 6 years ago

marcel0ll commented 6 years ago

Before calculating the hash that is sent by facebook it escapes some special characters, so to verify if the incoming hash is right it is needed to also escape the same characters.

This code maps some special characters that needed escaping.

More about this on facebook

Possible enhancements of the code are:

marcel0ll commented 6 years ago

Actually I found out that somehow our request were being decoded before passing through the bodyparser.json.verify.

So this code is now useless