Compare commits

...
2 Commits
Author SHA1 Message Date
kiskaadee 9bd95c6fa5 fix(deps): bump certifi to 2026.10.23 (CVE-2026-115557)
Remediate eMudhra/emSign intermediate CA private key compromise by updating certifi to 2026.10.23.
2026-10-29 13:36:14 -05:00
kiskaadee 0a53bbd942 fix(extension): resolve browserAPI from global lexical scope instead of window
- In Firefox WebExtension content scripts, window is the webpage DOM window and does not expose extension APIs for security
- Access global browser/chrome identifiers directly via typeof checks
- Wrap background message dispatch in try-catch to prevent uncaught exceptions from blocking in-page modal display
2026-09-25 16:51:40 -05:00
5 changed files with 17 additions and 11 deletions

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
// app.js - Logic for Magnetflix Page
const browserAPI = window.browser || window.chrome;
const browserAPI = typeof browser !== "undefined" ? browser : (typeof chrome !== "undefined" ? chrome : null);
// State
let selectedMovie = null;
+1 -1
View File
@@ -1,5 +1,5 @@
// Background script for Magnetflix extension
const browserAPI = window.browser || window.chrome;
const browserAPI = typeof browser !== "undefined" ? browser : (typeof chrome !== "undefined" ? chrome : null);
// Listen for messages from content scripts and popups
browserAPI.runtime.onMessage.addListener((request, sender, sendResponse) => {
+10 -4
View File
@@ -1,6 +1,6 @@
// Content script for Magnetflix: intercepts magnet links and displays popup modal
(function () {
const browserAPI = window.browser || window.chrome;
const browserAPI = typeof browser !== "undefined" ? browser : (typeof chrome !== "undefined" ? chrome : null);
let activeModalHost = null;
// Helper to extract display name from magnet link
@@ -330,14 +330,20 @@
event.preventDefault();
event.stopPropagation();
// Show popup modal on the page
showMagnetModal(href);
// Inform background script of captured magnet
if (browserAPI && browserAPI.runtime && browserAPI.runtime.sendMessage) {
try {
browserAPI.runtime.sendMessage({
action: "magnet_captured",
magnet: href
});
// Show popup modal on the page
showMagnetModal(href);
} catch (err) {
console.warn("Magnetflix: Could not notify background script:", err);
}
}
}
}
},
+4 -4
View File
@@ -1,5 +1,5 @@
version = 1
revision = 3
revision = 5
requires-python = ">=3.13"
resolution-markers = [
"python_full_version >= '3.14'",
@@ -48,11 +48,11 @@ wheels = [
[[package]]
name = "certifi"
version = "2026.7.22"
version = "2026.10.23"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" }
sdist = { url = "https://files.pythonhosted.org/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd", size = 136225, upload-time = "2026-10-23T11:36:16.478Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" },
{ url = "https://files.pythonhosted.org/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1", size = 135082, upload-time = "2026-10-23T11:36:14.763Z" },
]
[[package]]
+1 -1
View File
@@ -1,5 +1,5 @@
// popup.js for Magnetflix toolbar popup
const browserAPI = window.browser || window.chrome;
const browserAPI = typeof browser !== "undefined" ? browser : (typeof chrome !== "undefined" ? chrome : null);
const SAMPLE_MAGNET = "magnet:?xt=urn:btih:1234567890abcdef1234567890abcdef12345678&dn=Perfect.Blue.1997.1080p.BluRay.x264";