fix(nextcloud-files): WR-09/IN-02 ungueltige Pfadzeichen sind 400, Vorschau ohne SVG
- WR-09: ein einzelnes UTF-16-Ersatzzeichen in einem Pfadsegment ist 400 invalidPath (bzw. invalidName) statt eines URIError mit 500; die Weboberflaeche wiederholt keine 4xx - IN-02: Vorschaubilder nur als Rasterbild, image/svg+xml wird wie ein fehlendes Vorschaubild behandelt (CSP-Sandbox und nosniff bleiben) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,12 @@ export class NextcloudFilesService {
|
||||
'x-content-type-options': 'nosniff',
|
||||
'content-security-policy': "default-src 'none'; sandbox",
|
||||
},
|
||||
accept: (contentType) => contentType.toLowerCase().startsWith('image/'),
|
||||
// Nur Rasterbilder (IN-02): SVG kann Skript enthalten; CSP-Sandbox und nosniff entschaerfen
|
||||
// das zwar, aber eine Vorschau braucht kein SVG (Nextcloud rendert Vorschauen als PNG/JPEG).
|
||||
accept: (contentType) => {
|
||||
const type = contentType.toLowerCase();
|
||||
return type.startsWith('image/') && !type.startsWith('image/svg');
|
||||
},
|
||||
maxBytes: PREVIEW_MAX_BYTES,
|
||||
onExpired: () => this.account.markExpired(tenantId, userId),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user