fix(security): API-Keys nur für Admins, Mailversand ohne Datei-/URL-Zugriff
- ApiKeysController verlangt MANAGE_SETTINGS. Bisher konnte jeder
OIDC-Benutzer einen API-Key erzeugen, der im PermissionsGuard jede
Rechteprüfung umgeht (Rechteausweitung zum Admin).
- MailService setzt disableFileAccess/disableUrlAccess für jede Mail.
- send-email im Posteingang prüft den Body streng auf Strings/Zahlen.
Bisher liest nodemailer bei html: { path: '/proc/self/environ' }
beliebige Serverdateien ein und verschickt sie.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0406354b8b
commit
bb8bf3714f
7 files changed
+192
-9
No files matched your search
@@ -9,9 +9,14 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { ApiKeysService } from './api-keys.service';
|
||||
import { JwtAuthGuard } from './jwt-auth.guard';
|
||||
import { RequirePermissions } from './permissions.decorator';
|
||||
import { Permission } from './permissions.enum';
|
||||
|
||||
@Controller('api/api-keys')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
// Ein API-Key umgeht im PermissionsGuard jede Rechteprüfung – Anlegen und
|
||||
// Verwalten darf daher nur, wer ohnehin alle Einstellungen verwalten darf.
|
||||
@RequirePermissions(Permission.MANAGE_SETTINGS)
|
||||
export class ApiKeysController {
|
||||
constructor(private readonly apiKeysService: ApiKeysService) {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user