diff --git a/electron/crash.html b/electron/crash.html index 277427d..14d9ba1 100644 --- a/electron/crash.html +++ b/electron/crash.html @@ -4,7 +4,7 @@ MeshChatX - Crash Report diff --git a/electron/loading.html b/electron/loading.html index 09850ae..d81aa6d 100644 --- a/electron/loading.html +++ b/electron/loading.html @@ -3,7 +3,7 @@ diff --git a/electron/main.js b/electron/main.js index 95b0a7d..5ac692e 100644 --- a/electron/main.js +++ b/electron/main.js @@ -506,7 +506,7 @@ app.whenReady().then(async () => { // Define a robust fallback CSP that matches our backend's policy const fallbackCsp = [ "default-src 'self'", - "script-src 'self' 'unsafe-inline'", + "script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval'", "style-src 'self' 'unsafe-inline'", "img-src 'self' data: blob: https://*.tile.openstreetmap.org https://tile.openstreetmap.org https://*.cartocdn.com https://tiles.openfreemap.org https://*.openfreemap.org", "font-src 'self' data: https://tiles.openfreemap.org https://*.openfreemap.org", diff --git a/tests/backend/test_csp_logic.py b/tests/backend/test_csp_logic.py index f660eda..fd1aa6a 100644 --- a/tests/backend/test_csp_logic.py +++ b/tests/backend/test_csp_logic.py @@ -66,6 +66,7 @@ async def test_csp_header_logic(mock_rns_minimal, tmp_path): assert "https://api.example.com" in csp assert "https://tiles.example.com" in csp assert "default-src 'self'" in csp + assert "wasm-unsafe-eval" in csp @pytest.mark.asyncio