Skip to content

Commit c6442a0

Browse files
authored
Fix MV3 secret generation in insecure contexts (#200)
1 parent bc9c3d4 commit c6442a0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/chrome-mv3/inject.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inject/chrome-mv3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global contentScopeFeatures */
22

3-
const secret = window.crypto.randomUUID()
3+
const secret = (crypto.getRandomValues(new Uint32Array(1))[0] / 2 ** 32).toString().replace('0.', '')
44

55
contentScopeFeatures.load({
66
platform: {

0 commit comments

Comments
 (0)