-
Notifications
You must be signed in to change notification settings - Fork 107
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
Binary payload is ruined by toString() #50
Labels
Comments
Care to test omsmith@f42ed46? |
Looks good, thanks for fast action! |
Should be able to follow up with actual integration tonight/tomorrow. |
omsmith
added a commit
to omsmith/node-jws
that referenced
this issue
Jun 30, 2016
binary payloads would get mangled due to the unnecessary string conversion, which should go the other way around Fixes: auth0#50
omsmith
added a commit
to omsmith/node-jws
that referenced
this issue
Jul 21, 2017
binary payloads would get mangled due to the unnecessary string conversion, which should go the other way around Fixes: auth0#50
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Despite ostensibly supporting a binary payload, the bytes of the payload are mangled by including a toString() call before encoding the payload (sign-stream.js:12).
A Buffer is binary data - it is not supposed to be transformed into a string, as strings are not capable of containing arbitrary binary data. Right now, this defect mangles bytes outside some safe range (ASCII?).
Example code:
Expected result:
Actual result:
The text was updated successfully, but these errors were encountered: