gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: "JWT sign" for RS256 is broken since version v10.13.0

gloryknight opened this issue · comments

Describe the bug
"JWT sign" and "JWT verify" for RS256 are broken since version v10.13.0 (last working version is v10.10.0).

To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

  1. Go to 'CyberChef'
  2. Click on 'BAKE!'
  3. In the output window
  4. See error: TypeError: Right-hand side of 'instanceof' is not an object

Expected behaviour
Signed JWT. Works with version is v10.10.0.

Screenshots
image

Desktop (if relevant, please complete the following information):

  • OS: Windows
  • Browser: chrome 123.0.6312.59 (Official Build) (64-bit)
  • CyberChef version: > v10.14.0

Additional context
There might be other functions affected which I did not check.

Looks like the JWT library we use passes when running within Node, but the update to v9 broke all browser based usage. I'll revert the change and look at perhaps migrating to another library that continues to support the browser.

Fixed in #1769

Thank you very much for this amazing tool and the fast fix 👍