fix(api): harden ratelimit, SSRF, uploads and DM guards (#2074)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-29 14:55:09 +02:00
1 parent bbd93df239
commit f2ea10f951
9 files changed
+121 -41

No files matched your search

@@ -296,12 +296,14 @@ export class StorageService implements IStorageService {
key,
uploadId,
partNumber,
contentLength,
expiresIn = seconds('1 hour'),
}: {
bucket: string;
key: string;
uploadId: string;
partNumber: number;
contentLength?: number;
expiresIn?: number;
}): Promise<string> {
const command = new UploadPartCommand({
@@ -309,6 +311,7 @@ export class StorageService implements IStorageService {
Key: key,
UploadId: uploadId,
PartNumber: partNumber,
ContentLength: contentLength,
});
return getSignedUrl(this.presignClient, command, {expiresIn});
}