You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes an error for me locally as it tries to JSON.parse the resulting Buffer.
SyntaxError: Unexpected token � in JSON at position 0
at parse (<anonymous>)
at JSON.parse (/Users/xxx/xxx/xxx/xxx/tests/_setup.js:20:20)
at /Users/xxx/xxx/xxx/xxx/node_modules/node-jose/lib/jwe/decrypt.js:100:26
at process._tickDomainCallback (internal/process/next_tick.js:129:7) { '0': <Buffer REDACTED ... > }
Proposed fix: Call toString on the buffer.
The text was updated successfully, but these errors were encountered:
SimonSchick
changed the title
Incorrect usage of rlsafe-base64 leading to errors.
Incorrect usage of urlsafe-base64 leading to errors.
Dec 27, 2016
linuxwolf
added a commit
to linuxwolf/node-jose
that referenced
this issue
Dec 29, 2016
Incorrect usage of
urlsafe-base64
injwt/decrypt.js:99
:https://github.com/cisco/node-jose/blob/master/lib/jwe/decrypt.js#L99
Assumes that the function has a second parameter for encoding, which is incorrect:
https://github.com/RGBboy/urlsafe-base64/blob/master/lib/urlsafe-base64.js#L50
This causes an error for me locally as it tries to
JSON.parse
the resultingBuffer
.Proposed fix: Call
toString
on the buffer.The text was updated successfully, but these errors were encountered: