You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Security/EscapeOutput: fix false negatives when handling anonymous classes (#2559)
* Security/EscapeOutput: fix false negatives when handling anonymous classes
This commit fixes false negatives when the sniff handles readonly anonymous classes and anonymous classes with attributes that are part of a throw statement.
When stepping over tokens after `T_THROW` to find the `T_OPEN_PARENTHESIS` of the exception creation function call/class instantiation, the sniff was not considering that it might need to step over `T_READONLY` tokens or attribute declarations when dealing with anonymous classes.
Fixes#2552
---------
Co-authored-by: jrfnl <[email protected]>
0 commit comments