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

Support for Firefox sandboxed Uint8Array #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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