mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
fix(api): return 400 (not 500) for malformed JSON on /api/auth/login (#4031)
Wrap request.json() so a malformed/non-JSON login body returns a structured 400 instead of falling through to the 500 catch. Fixes the schemathesis high-risk-endpoint DAST finding (verified: schemathesis step now passes). +TDD test. Integrated into release/v3.8.27.
This commit is contained in:
@@ -26,7 +26,7 @@ const INJECTION_PATTERNS = [
|
||||
{
|
||||
name: "system_prompt_leak",
|
||||
pattern:
|
||||
/\b(reveal|show|display|print|output|repeat)\s+(your\s+)?(system\s+prompt|instructions?|initial\s+prompt|hidden\s+prompt)/i,
|
||||
/\b(reveals?|shows?|displays?|prints?|outputs?|repeats?)\s+((your|the)\s+)?(system\s+prompt|instructions?|initial\s+prompt|hidden\s+prompt)/i,
|
||||
severity: "high",
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user