Repository navigation
Conversation
…s return as user input
|
bugbot review |
| $input_taints & ~self::getRemovedTaints($codebase, $args['options'] ?? null, null), | ||
| $context, | ||
| $type, | ||
| ); |
There was a problem hiding this comment.
Server key skip missing array path
Medium Severity
When filter_input_array() is called with INPUT_SERVER and no per-field definition map, the branch that treats the whole return as request taint never skips server-controlled keys. That diverges from single-key filter_input() and from the per-key array loop, which both honor ServerVariableTaints::isUserControlled() for entries like DOCUMENT_ROOT.
Reviewed by Cursor Bugbot for commit 0fe6361. Configure here.
✅ Performance: unchanged · Types: unchanged
How to read this table
head 33bdae0 · base ab8c4e5 (merge-base) · workflow run |
… the function and with unknown flags
|
bugbot review |
|
bugbot review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 33bdae0. Configure here.
|
|
||
| return $arrays === 0 | ||
| ? self::MAX_KEY_DEPTH | ||
| : max(1, min(self::MAX_KEY_DEPTH, intdiv(self::MAX_FLOWS - count($filters), $arrays))); |
There was a problem hiding this comment.
Skipped server filters shrink depth
Medium Severity
getKeyDepth() uses count($filters) against MAX_FLOWS, but taintInputArray() skips non-user-controlled INPUT_SERVER entries without creating a per-field source. Those skipped names still lower the computed key depth, so nested array keys can lose taint under large INPUT_SERVER filter maps.
Reviewed by Cursor Bugbot for commit 33bdae0. Configure here.


Psalm doesn't treat what
filter_input(),filter_input_array(),getallheaders(),apache_request_headers(),request_parse_body()andreadline()return as user input.Request functions
Before
After
Defaults of filters
Psalm treats the default value
filter_var()gives instead of an invalid one as if it was filtered.Before
After
Sanitizing filters
Psalm reports what
filter_var()encodes.Before
After
Unpacked arguments
Psalm infers
neverforfilter_input()with unpacked arguments, and doesn't analyze the code after it.Before
After