Skip to content

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

Open
@dhensby

Description

@dhensby

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions