Skip to content

Conversation

rrrooommmaaa
Copy link
Contributor

When loading OpenPGP.js 5.7.0 in a web content script in Firefox 112, it turned out
Uint8Array.prototype !== globalThis.Uint8Array.prototype, as a result Key.armor() fails on a parsed key.
This patch fixes the problem.

@larabr
Copy link
Collaborator

larabr commented Jan 16, 2024

Hey @rrrooommmaaa , pardon the late reply; we are considering merging this for the new release that will be used by OpenPGP.js v6.
But we have some reservations, because allowing "mixed" types could lead to other unexpected issues in certain apps, as we'd still use and return a built-in Uint8Array everywhere, and not throwing an error here might make it harder to spot/debug problems for certain users.

Does it not work to manually overwrite Uint8Array = globalThis.Uint8Array ?

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 this pull request may close these issues.

2 participants