perf: add database indexes, implement caching, enforce permission guards, and sanitize external URLs
Build and Push Multi-Platform Images / build-and-push (push) Successful in 48s

This commit is contained in:
2026-05-10 22:01:06 +02:00
parent 351938aa5c
commit aa4c181b0c
14 changed files with 94 additions and 40 deletions
@@ -21,6 +21,7 @@ export class EmailController {
) {}
@Get()
@RequirePermissions(Permission.VIEW_MAIL)
async getEmails(
@Query('status') status?: string,
@Query('limit') limit?: string,
@@ -38,6 +39,7 @@ export class EmailController {
}
@Get(':id')
@RequirePermissions(Permission.VIEW_MAIL)
async getEmail(@Param('id') id: string) {
return this.emailRepo.findOneOrFail({
where: { Id: parseInt(id, 10) },
@@ -46,6 +48,7 @@ export class EmailController {
}
@Get(':id/attachments')
@RequirePermissions(Permission.VIEW_MAIL)
async getAttachments(@Param('id') id: string) {
return this.attachmentRepo.find({
where: { EmailMessageId: parseInt(id, 10) },
@@ -54,6 +57,7 @@ export class EmailController {
}
@Get('attachments/:attachmentId/content')
@RequirePermissions(Permission.VIEW_MAIL)
async getAttachmentContent(
@Param('attachmentId') attachmentId: string,
@Res() res: Response,