mirror of
https://github.com/momenbasel/keyFinder.git
synced 2026-06-07 16:43:55 +02:00
v2.1.0: security hardening + cross-browser parity + release CI (#15)
Cherry-picks @anthonyonazure's closed PR #11 onto master post-Firefox port, adds Firefox parity for the nonce-validated interceptor bridge, and ships GH Actions for tag-driven releases plus PR validation. Closes #11 Co-Authored-By: Anthony <anthony@anthonyonazure.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const nonce = crypto.randomUUID();
|
||||
|
||||
// Store nonce where both MAIN world (interceptor) and ISOLATED world (content.js) can read it.
|
||||
// The interceptor removes data-kf-nonce after reading; data-kf-verify stays for content.js.
|
||||
const el = document.documentElement;
|
||||
el.setAttribute("data-kf-nonce", nonce);
|
||||
el.setAttribute("data-kf-verify", nonce);
|
||||
|
||||
const script = document.createElement("script");
|
||||
script.src = chrome.runtime.getURL("js/interceptor.js");
|
||||
(document.head || document.documentElement).appendChild(script);
|
||||
script.onload = () => script.remove();
|
||||
})();
|
||||
Reference in New Issue
Block a user