diff options
| author | Agando <roduccomm@gmail.com> | 2026-07-02 06:00:40 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-07-02 06:00:40 +0200 |
| commit | ea4d09fb5ccba12ed774fcf7c913edfa1e6a851a (patch) | |
| tree | 2361e33e52cdb4e0880ed0c776ed75943b37d7cf /modules/core/module-manager.js | |
| parent | 8b3e3e4527772bf060984f98777a2cff8e88aa09 (diff) | |
auto: 2026-07-02_06:00 changes
Diffstat (limited to 'modules/core/module-manager.js')
| -rw-r--r-- | modules/core/module-manager.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/core/module-manager.js b/modules/core/module-manager.js index 8cecc4d..4723bff 100644 --- a/modules/core/module-manager.js +++ b/modules/core/module-manager.js @@ -36,6 +36,11 @@ } async loadModuleFromURL(url) { try { + // Security: block cross-origin URLs for module loading + if (url && url.match(/^https?:\/\//) && !url.startsWith(window.location.origin)) { + this.terminal.print(`⚠️ Security: only same-origin URLs allowed for module loading`, 'error'); + return false; + } this.terminal.print(`Loading module from ${url}...`, 'info'); const response = await fetch(url); if (!response.ok) throw new Error(`HTTP ${response.status}`); |