Skip to content
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

Signature helper fails with Encoding::UndefinedConversionError #251

Open
Sokre95 opened this issue Aug 8, 2023 · 0 comments
Open

Signature helper fails with Encoding::UndefinedConversionError #251

Sokre95 opened this issue Aug 8, 2023 · 0 comments

Comments

@Sokre95
Copy link

Sokre95 commented Aug 8, 2023

When using Hubspot::Helpers::Signature to verify webhooks Encoding::UndefinedConversionError is raised when payload contains characters like ü.

Error is raised when encode is called on source_string

Screenshot 2023-08-08 at 18 29 31

Error message:

Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8

Actual error can occur for all 3 signature versions. I hot-fixed this in our fork by calling force_encoding, but I'm afraid that's not the proper fix.

@Sokre95 Sokre95 changed the title Ssignature helper fails with Encoding::UndefinedConversionError Signature helper fails with Encoding::UndefinedConversionError Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant