fix(security): VULN-009 magic-byte MIME validation + UTC date fix
- uploadEvidenceFile: validate file type via file-type magic bytes, reject client-supplied MIME, derive extension from detected type, upload ArrayBuffer - getEscalationThreshold: use setUTCHours instead of setHours so date-only ISO strings (always UTC midnight) compare consistently in any timezone - Tests: mock file-type, update upload expectation to ArrayBuffer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"@anthropic-ai/sdk": "^0.111.0",
|
||||
"@supabase/ssr": "^0.12.0",
|
||||
"@supabase/supabase-js": "^2.110.2",
|
||||
"file-type": "^22.0.1",
|
||||
"idb": "^8.0.3",
|
||||
"next": "^15.5.20",
|
||||
"openai": "^6.46.0",
|
||||
|
||||
Reference in New Issue
Block a user