-
Notifications
You must be signed in to change notification settings - Fork 1
Comparing changes
Open a pull request
base repository: JavaScriptSolidServer/podkey
base: gh-pages
head repository: JavaScriptSolidServer/podkey
compare: main
- 12 commits
- 8 files changed
- 3 contributors
Commits on Apr 23, 2026
-
Don't overwrite existing Authorization headers (#5)
Podkey's fetch/XHR interceptors unconditionally set Authorization on every outbound request, replacing whatever the page already put there. Pages using Solid-OIDC (Authorization: DPoP <token>) have their auth silently swapped for Podkey's NIP-98 signature — the server then authenticates as did:nostr:<podkey-key>, doesn't match the user's real WebID, and denies access. User gets 403 on their own pod. Fix: before injecting NIP-98, check whether the page already set Authorization. If yes, step aside and let the page authenticate itself. If that auth gets a 401, the existing retry-on-401 path still tries NIP-98 as a fallback. Covers both fetch (options.headers across Headers/object/array shapes) and XHR (via a setRequestHeader override that tags the request). New hasAuthorizationHeader helper is canonical in src/auth-header-utils.js with unit tests. The in-page scripts duplicate it because they load as classic scripts without ESM imports.
Configuration menu - View commit details
-
Copy full SHA for 26144b4 - Browse repository at this point
Copy the full SHA 26144b4View commit details -
Merge pull request #6 from JavaScriptSolidServer/issue-5-respect-exis…
…ting-auth Don't overwrite existing Authorization headers (#5)
Configuration menu - View commit details
-
Copy full SHA for b83f414 - Browse repository at this point
Copy the full SHA b83f414View commit details
Commits on May 12, 2026
-
security: remove broken crypto-browser.js that leaks private key mate…
…rial crypto-browser.js contained a completely broken "Schnorr" implementation that: - Derived public keys via SHA-256(private_key) instead of secp256k1 scalar multiplication - Created "signatures" as SHA-256(private_key || event_id) duplicated to 128 hex chars - This means signatures contained material directly derived from the private key, enabling private key recovery through known-plaintext analysis While the file is not imported in the current bundled build (background.js imports from crypto.js which uses @noble/secp256k1), its presence in the source tree is an active hazard: any future refactor, build configuration change, or browser field mapping in package.json could silently activate this broken implementation. The correct implementation lives in src/crypto.js using @noble/secp256k1 with proper Schnorr signatures per BIP-340 / NIP-01. Co-Authored-By: claude-flow <ruv@ruv.net>
Configuration menu - View commit details
-
Copy full SHA for f53c6d7 - Browse repository at this point
Copy the full SHA f53c6d7View commit details -
security: add explicit Content Security Policy to manifest
MV3 has restrictive CSP defaults, but an explicit policy documents the intended security posture, prevents accidental relaxation during future development, and makes the extension's trust boundary auditable at a glance. Co-Authored-By: claude-flow <ruv@ruv.net>
Configuration menu - View commit details
-
Copy full SHA for 6224437 - Browse repository at this point
Copy the full SHA 6224437View commit details -
fix: remove unused webRequest permission from manifest
The webRequest permission is declared but never used — the code explicitly notes that webRequestBlocking is deprecated in MV3 and uses JavaScript-level fetch/XHR interception instead. Removing this permission reduces the extension's privilege surface and avoids triggering unnecessary review during Chrome Web Store submission. Co-Authored-By: claude-flow <ruv@ruv.net>
Configuration menu - View commit details
-
Copy full SHA for 00e13d8 - Browse repository at this point
Copy the full SHA 00e13d8View commit details -
fix: remove broken bech32 nsec/npub stub functions
The privateKeyToNsec, nsecToPrivateKey, and publicKeyToNpub functions emitted fake nsec_<hex> / npub_<hex> strings that are not valid NIP-19 bech32 encoding. These stubs could confuse users into thinking they have a valid key backup, and any interoperability with other Nostr clients would silently fail. The functions are not imported or called anywhere in the codebase, so they are removed entirely rather than replaced with throwing stubs. Proper NIP-19 bech32 support can be added when needed via a bech32 library. Co-Authored-By: claude-flow <ruv@ruv.net>
Configuration menu - View commit details
-
Copy full SHA for 1072ba5 - Browse repository at this point
Copy the full SHA 1072ba5View commit details -
security: sanitize HTML in popup trusted-origins list to prevent XSS
Replace innerHTML template literal interpolation with DOM API methods (createElement, textContent, appendChild) when rendering the trusted origins list. The previous code interpolated the origin string directly into HTML, allowing an attacker who injects a malicious string into the trusted origins (e.g. <img src=x onerror="...">) to execute arbitrary JavaScript in the popup's privileged extension context, potentially exfiltrating the user's private key. Co-Authored-By: claude-flow <ruv@ruv.net>
Configuration menu - View commit details
-
Copy full SHA for 60be0f7 - Browse repository at this point
Copy the full SHA 60be0f7View commit details -
Merge pull request #10 from jjohare/security/remove-crypto-browser-fa…
…llback security: remove crypto-browser.js (broken Schnorr leaks private key)
Configuration menu - View commit details
-
Copy full SHA for cf38142 - Browse repository at this point
Copy the full SHA cf38142View commit details -
Merge pull request #11 from jjohare/security/add-manifest-csp
security: add explicit Content Security Policy to manifest
Configuration menu - View commit details
-
Copy full SHA for ca48fa4 - Browse repository at this point
Copy the full SHA ca48fa4View commit details -
Merge pull request #13 from jjohare/fix/remove-unused-webrequest
fix: remove unused webRequest permission
Configuration menu - View commit details
-
Copy full SHA for f486aa0 - Browse repository at this point
Copy the full SHA f486aa0View commit details
Commits on May 13, 2026
-
Merge pull request #15 from jjohare/security/fix-popup-xss
security: sanitize HTML in popup trusted-origins list (XSS fix)
Configuration menu - View commit details
-
Copy full SHA for c051833 - Browse repository at this point
Copy the full SHA c051833View commit details -
Merge pull request #16 from jjohare/fix/remove-fake-bech32
fix: remove broken bech32 nsec/npub stub functions
Configuration menu - View commit details
-
Copy full SHA for ef27ea6 - Browse repository at this point
Copy the full SHA ef27ea6View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff gh-pages...main