-
Notifications
You must be signed in to change notification settings - Fork 48
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
Webhook signature validation fails for Meetings with non-ASCII chars in the topic #349
Comments
Thanks for reporting this issue and, most importantly, for investing the time to investigate and suggest a possible solution.
At first glance, what you are saying makes sense but I seem to recall that I tried UTF8 when I worked on this feature and something didn't work as expected. But that was 2 years ago so I may not be remembering correctly. I'll be away all day tomorrow but I'll invest time to test your suggestion when I come back. |
Good news: I am able to reproduce the problem by creating a meeting with the "Test 🚒🚒 ? - ’ - – 🚗 HOLA" topic as you suggested. More good news: I can resolve this problem by switching to UTF8 encoding as you suggested Even more good news: I have added unit tests for testing the I'll start working on a new release and publish it over the weekend. |
Awesome man!!! Thanks for the quick, friendly and informative responses! Take care ;) |
🎉 This issue has been resolved in version 0.78.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
Webhook calls sent by Zoom contain the topic of the meeting in their body, and when that topic contains non-ASCII chars the signature validation fails.
Example webhook call body:
Repro steps:
Root of the problem
I have done some debugging and testing, and the problem is in
WebhookParser.cs
file, line 37.var hashAsBytes = hmac.ComputeHash(Encoding.ASCII.GetBytes(message));
that line doesn't consider possible non-ASCII chars in the body, thus in the end generating a different signature than Zoom does. So the validation fails.
Possible fix
Changing the previosly mentioned line to:
var hashAsBytes = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
seems to fix the issue.
I wasn't able to create a test for this case (there are no tests for webhook signature validations), but I can send a PR with the change if needed (although maybe it's not worth it).
Temporal workaround
For anyone that needs a quick workaround, I was able to get away with this:
Thanks for all the effort put in this great library !!
The text was updated successfully, but these errors were encountered: