-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bug: detached jws encoding error #57
Comments
Also, @panva Thank you for this library! I used it to test interoperability with browser JWS implementations using secp256k1 / ed25519. I have some JSON-LD signature suites that I need to update to support the features of jsonld-signatures, which is the main reason I came across this issue, and these JWS use |
https://github.com/panva/jose/blob/master/docs/README.md#jwsverifyjws-keyorstore-options i think you should be providing parse:false to just get a buffer back if you’re working with b64:false and arbitrary buffers |
But please provide a code snippet so that i don’t have to guess what you’re doing. |
Sorry, I should have provided a more minimal example, I will do so. |
https://gist.github.com/OR13/862380ac861ee2d937df2653c22ea44a
This gist was modified from the comment on the original issue: |
Thank you, i can work with this. |
can you take a look at daabedc? |
Thanks, I retested, and your fix appears to have resolved this issue. |
Describe the bug
The way utf-8 encoding is applied to detached jws causes incompatibility issues.
To Reproduce
transmute-industries/json-ld-sig-detached-jws#1
Steps to reproduce the behaviour:
Expected behaviour
base64url decode applied to the payload should not assume utf8.
Environment:
"@panva/jose": "^1.9.3",
"jose": "^1.16.0",
Additional context
The text was updated successfully, but these errors were encountered: