-
Notifications
You must be signed in to change notification settings - Fork 62.2k
Update securing-your-webhooks.md #3315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For example in C# you may need to use Encoding.UTF8.GetBytes(payload) instead of Encoding.ASCII.GetBytes(payload). Thanks. Cheers.
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
@The-Pharoah Yes, this is related to securing the web hook. For someone to properly validate the web hook they need to treat the payload as unicode. Otherwise if there's a unicode character in the webhook JSON the signature will not be validated properly. A few examples of how this can happen are 1) if there's a long merge commit title GitHub automatically puts a "..." unicode character in the message field of the JSON, 2) if someone's name has unicode characters, or 3) if someone uses unicode characters in their pull request title. Cheers. |
@kristianjaeger Thanks so much for opening a PR! I'll get this triaged for review ⚡ |
Thanks, @janiceilene ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this contribution, @kristianjaeger! 🙇♂️
I've reworded the new encoding note and separated it into a separate block closer to the complete code example.
I'll get this merged in! 🎉
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. |
Thanks so much, @lucascosti and @janiceilene ! Cheers. |
Co-authored-by: Lucas Costi <[email protected]>
Co-authored-by: Lucas Costi <[email protected]>
Co-authored-by: Lucas Costi <[email protected]>
For example in C# you may need to use Encoding.UTF8.GetBytes(payload) instead of Encoding.ASCII.GetBytes(payload). Thanks. Cheers.
Why:
What's being changed:
Check off the following: