fix(security): remediate audit vulnerabilities SEC-001 through SEC-023
Deploy Canina / deploy (push) Successful in 2m25s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 7s

This commit is contained in:
parsa committed 2026-09-23 23:00:25 +03:30
1 parent dc88677169
commit bd49fbc4a0
31 files changed
+867 -114

No files matched your search

+5 -1
View File
@@ -51,7 +51,11 @@ export class MediaService {
}
const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1e9);
const ext = path.extname(originalname);
const ext = path.extname(originalname).toLowerCase();
const ALLOWED_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.webp', '.gif', '.pdf'];
if (!ALLOWED_EXTENSIONS.includes(ext)) {
throw new BadRequestException('پسوند فایل ارسالی مجاز نیست (فرمت SVG و فایل‌های اجرایی مسدود هستند).');
}
const filename = `${uniqueSuffix}${ext}`;
const filePath = path.join(uploadDir, filename);