fix(security): Befunde aus dem Security-Audit beheben #7
@@ -276,12 +276,16 @@ export class PaperlessController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Original-PDF – für den Bearbeiten-Dialog und den Duplikatvergleich im
|
* Original-PDF – für den Bearbeiten-Dialog und den Duplikatvergleich in
|
||||||
* Scanner (dort ein beliebiges vorhandenes Dokument), deshalb ohne Prüfung
|
* Scanner und Mail-Import (dort ein beliebiges vorhandenes Dokument),
|
||||||
* pro Dokument.
|
* deshalb ohne Prüfung pro Dokument.
|
||||||
*/
|
*/
|
||||||
@Get('documents/:id/pdf')
|
@Get('documents/:id/pdf')
|
||||||
@RequirePermissions(Permission.VIEW_INBOX, Permission.VIEW_SCANNER)
|
@RequirePermissions(
|
||||||
|
Permission.VIEW_INBOX,
|
||||||
|
Permission.VIEW_SCANNER,
|
||||||
|
Permission.VIEW_MAIL,
|
||||||
|
)
|
||||||
async getDocumentPdf(@Param('id') id: string, @Res() res: Response) {
|
async getDocumentPdf(@Param('id') id: string, @Res() res: Response) {
|
||||||
try {
|
try {
|
||||||
const stream = await this.paperlessService.getDocumentPdfStream(
|
const stream = await this.paperlessService.getDocumentPdfStream(
|
||||||
|
|||||||
Reference in new issue
Block a user