Commit f3dc027
fix(security): sanitize request method/URI in RateLimitFilter log (CWE-117)
CodeQL flagged RateLimitFilter#doFilterInternal:116 with
java/log-injection — same root cause as the BearerAuthFilter
finding fixed earlier in this PR: request.getMethod() and
request.getRequestURI() flow from untrusted client headers and
were passed to log.warn unsanitized.
Reuses BearerAuthFilter.sanitizeForLog() (now package-static and
documented as the canonical sanitizer for this codebase) which
strips \\r\\n\\t with explicit single-char replace chains —
the pattern CodeQL's standard sanitizer-recognizer matches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 664cf42 commit f3dc027
1 file changed
Lines changed: 7 additions & 1 deletion
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
0 commit comments