[117] Material-Symbols lokal gebündelt (npm material-symbols) statt Google Fonts; CSP ohne fonts.googleapis/gstatic, NOTICE ergänzt

This commit is contained in:
Claude committed 2026-11-03 17:49:41 +00:00
1 parent 6e6714d5d9
commit 8af6f73552
8 files changed
+18 -15

No files matched your search

+4
View File
@@ -1,5 +1,9 @@
Dossier — Hinweise zu übernommenem und eingebundenem Fremdcode ([51])
Material Symbols (Icon-Font, npm-Paket material-symbols, https://github.com/marella/material-symbols; Schrift von Google,
https://github.com/google/material-design-icons), Apache-2.0
Lokal gebündelt (src/main.tsx), statt von fonts.googleapis.com geladen ([117]).
acadrust (https://github.com/hakanaktt/acadrust), MPL-2.0
Abhängigkeit von src-tauri/fileio (DXF/DWG lesen und schreiben), unverändert eingebunden.
Der DWG-Code von acadrust ist aus ACadSharp portiert:
+1 -1
View File
@@ -1048,7 +1048,7 @@ Prüfung des ganzen Programms (Rust-Kern, TS-Hülle, Build/Sicherheit), nur Code
(Exporte/`saveBinaryFile` schreiben weiter direkt); in der Tauri-App nicht von Hand geprüft; Electron
schreibt keine Dateien (Browser-Download), daher keine Änderung; keine Wiederherstellungs-UI für `.obp~`. · S
- ✅ **[117] CSP setzen.** (3.11.) Eine Quelle `scripts/csp.cjs` (`script-src 'self' 'wasm-unsafe-eval'`, `worker-src 'self' blob:`,
`style-src` mit `'unsafe-inline'` für React-Inline-Styles + fonts.googleapis.com, `connect-src` = ipc + netFetch-Hosts +
`style-src` mit `'unsafe-inline'` für React-Inline-Styles (Icon-Font seit 3.11. lokal gebündelt: `material-symbols`, kein Google-Fonts-Host mehr), `connect-src` = ipc + netFetch-Hosts +
localhost/127.0.0.1 + ws://127.0.0.1 für die KI-Brücke). Tauri: `tauri.conf.json` (`devCsp: null`, Test `src/net/csp.test.ts`
gleicht mit `csp.cjs` und `ALLOWED_HOSTS` ab); Electron: Antwort-Header nur gepackt; Browser/e2e: Meta-Tag nur im Vite-Build
(Dev-HMR unberührt). `e2e/csp.spec.ts` prüft Plan/Schnitt/Ansicht/3D auf CSP-Verletzungen. Rich-Text: Text war schon
+1 -8
View File
@@ -3,14 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Material Symbols (Icon-Font) — DOSSIER-Look; ohne diese Font erschienen
die Ligaturnamen (z. B. „content_copy") als roher Text in Menüs/Toolbar. -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
/>
<!-- Material Symbols (Icon-Font) wird lokal über src/main.tsx gebündelt ([117]). -->
<link
rel="icon"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='%232f6df6'/%3E%3Cg fill='white'%3E%3Crect x='3' y='3' width='4' height='4'/%3E%3Crect x='9' y='3' width='4' height='4'/%3E%3Crect x='3' y='9' width='4' height='4'/%3E%3Crect x='9' y='9' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E"
+7
View File
@@ -19,6 +19,7 @@
"jspdf": "^4.2.1",
"jszip": "^3.10.1",
"lcms-wasm": "^1.0.5",
"material-symbols": "^0.48.2",
"pdfjs-dist": "^6.2.108",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -4562,6 +4563,12 @@
"@jridgewell/sourcemap-codec": "^1.5.5"
}
},
"node_modules/material-symbols": {
"version": "0.48.2",
"resolved": "https://registry.npmjs.org/material-symbols/-/material-symbols-0.48.2.tgz",
"integrity": "sha512-HepjQnrny9CsxBuTofUJsHS1Il41l3oa9ZiLHTnrKJKZbIyDvXHZJBD1ffLEO/5lSKdb8v2filRW59IPsO65yA==",
"license": "Apache-2.0"
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+1
View File
@@ -39,6 +39,7 @@
"jspdf": "^4.2.1",
"jszip": "^3.10.1",
"lcms-wasm": "^1.0.5",
"material-symbols": "^0.48.2",
"pdfjs-dist": "^6.2.108",
"react": "^18.3.1",
"react-dom": "^18.3.1",
+2 -5
View File
@@ -15,9 +15,6 @@ const NET_HOSTS = [
];
const https = NET_HOSTS.map((h) => `https://${h}`);
// Icon-Font (index.html): Stylesheet von fonts.googleapis.com, Schrift von fonts.gstatic.com.
const GOOGLE_FONTS_CSS = "https://fonts.googleapis.com";
const GOOGLE_FONTS_FILES = "https://fonts.gstatic.com";
const DIRECTIVES = {
"default-src": ["'self'"],
@@ -26,8 +23,8 @@ const DIRECTIVES = {
// Import-Worker (DXF/IFC/Mesh/Punktwolke) und pdf.js-Worker: Modul-URLs aus dem eigenen Bundle.
"worker-src": ["'self'", "blob:"],
// React setzt viele Inline-`style`-Attribute -> 'unsafe-inline' (nur Stile, keine Skripte).
"style-src": ["'self'", "'unsafe-inline'", GOOGLE_FONTS_CSS],
"font-src": ["'self'", "data:", GOOGLE_FONTS_FILES],
"style-src": ["'self'", "'unsafe-inline'"],
"font-src": ["'self'", "data:"],
"img-src": ["'self'", "data:", "blob:", ...https],
"media-src": ["'self'", "blob:"],
"connect-src": [
+1 -1
View File
@@ -21,7 +21,7 @@
}
],
"security": {
"csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; img-src 'self' data: blob: https://ambientcg.com https://api.ambientcg.com https://geo.admin.ch https://api3.geo.admin.ch https://wms.geo.admin.ch https://data.geo.admin.ch https://overpass-api.de https://nominatim.openstreetmap.org; media-src 'self' blob:; connect-src 'self' ipc: http://ipc.localhost blob: data: https://ambientcg.com https://api.ambientcg.com https://geo.admin.ch https://api3.geo.admin.ch https://wms.geo.admin.ch https://data.geo.admin.ch https://overpass-api.de https://nominatim.openstreetmap.org http://localhost:* http://127.0.0.1:* ws://127.0.0.1:*; object-src 'none'; base-uri 'self'; form-action 'none'",
"csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src 'self' data: blob: https://ambientcg.com https://api.ambientcg.com https://geo.admin.ch https://api3.geo.admin.ch https://wms.geo.admin.ch https://data.geo.admin.ch https://overpass-api.de https://nominatim.openstreetmap.org; media-src 'self' blob:; connect-src 'self' ipc: http://ipc.localhost blob: data: https://ambientcg.com https://api.ambientcg.com https://geo.admin.ch https://api3.geo.admin.ch https://wms.geo.admin.ch https://data.geo.admin.ch https://overpass-api.de https://nominatim.openstreetmap.org http://localhost:* http://127.0.0.1:* ws://127.0.0.1:*; object-src 'none'; base-uri 'self'; form-action 'none'",
"devCsp": null
}
},
+1
View File
@@ -11,6 +11,7 @@ import { initCore } from "./core";
import { getLanguage, setLanguage } from "./i18n";
import type { Language } from "./i18n";
import { applyThemeMode, getStoredThemeMode } from "./theme/themeMode";
import "material-symbols/outlined.css";
import "./styles.css";
import "./text/fonts.css";