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

[jsbn] Node 21 introduced navigator global object which has changed jsbn behaviour #1081

Open
dhensby opened this issue May 22, 2024 · 0 comments · May be fixed by #1082
Open

[jsbn] Node 21 introduced navigator global object which has changed jsbn behaviour #1081

dhensby opened this issue May 22, 2024 · 0 comments · May be fixed by #1082

Comments

@dhensby
Copy link
Contributor

dhensby commented May 22, 2024

See https://github.com/digitalbazaar/forge/blob/v1.3.1/lib/jsbn.js#L120-L133

The JSBN library uses the global navigator object to make optimisation assumptions about the runtime. It is currently assumed that node has no navigator global object and, thus, will follow the typeof navigator === 'undefined' path. This is no longer the case in v21+ and so now a different path is taken.

For now this can be avoided by running node with the --no-experimental-global-navigator option, but presumably this will eventually become permanent and the optimisation logic will need to change.

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

Successfully merging a pull request may close this issue.

1 participant