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

fix(cloudflare): bind getRandomValues and randomUUID to the crypto object #307

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

petebacondarwin
Copy link
Contributor

Resolves #306

@pi0 pi0 changed the title fix: ensure Cloudflare webcrypto bindings are bound to the correct this object fix(cloudflare): bind getRandomValues and randomUUID to the crypto object Sep 15, 2024
@pi0 pi0 merged commit 0439026 into unjs:main Sep 15, 2024
2 checks passed
@petebacondarwin
Copy link
Contributor Author

Actually this is not correct from some local testing. Please don't merge

@petebacondarwin
Copy link
Contributor Author

Doh!

@pi0
Copy link
Member

pi0 commented Sep 15, 2024

sorry for merge @petebacondarwin do you want to revert?

@petebacondarwin
Copy link
Contributor Author

No need to revert. This doesn't break anything.
But it doesn't fix the problem either.
I'll put up a new PR tomorrow

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.

Cloudflare crypto library creates a new webcrypto property which causes errors when calling getRandomBytes().
4 participants