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
{{ message }}
Repository navigation
PHP 8.3: Make unserialize() emit a warning for trailing bytes #1987
@unserialize('i:5;i:6;') - not sure what to expect, since this silences the PHP warning, but also might get promoted to an error in the future, so maybe worth flagging anyway.
See "Syntax Variations" for more examples.
Syntax Variations & Detectability
Since unserialize() is useful mostly in contexts where the input is a variable or a complex expression, reliably detecting it might be difficult.
Additionally, the sniff needs to be able to reproduce the deserialization to detect trailing bytes, which I believe might be overly complex.
At first glance, this seems not sniffable. Feedback welcome.
False positives - not calls to the unserialize() function, though they contain the string
@jrfnl I'm changing the formula a bit by focusing "Detection" sections on our actual target (things that observably changed), and move all the variations, false positives, etc to "Syntax Variations & Detectability", with 3v4l for various snippet categories. I still don't think that these should be viewed as test cases, but helps capture initial syntax ideas in one place.
@jrfnl Please postpone the review of the above findings until I do a related RFC, which might have an impact on how we approach this one. I'll let you know.
Activity
afilina commentedon Nov 6, 2025
@jrfnl I'm changing the formula a bit by focusing "Detection" sections on our actual target (things that observably changed), and move all the variations, false positives, etc to "Syntax Variations & Detectability", with 3v4l for various snippet categories. I still don't think that these should be viewed as test cases, but helps capture initial syntax ideas in one place.
afilina commentedon Nov 6, 2025
@jrfnl Please postpone the review of the above findings until I do a related RFC, which might have an impact on how we approach this one. I'll let you know.
afilina commentedon Nov 6, 2025
@jrfnl Research into both related
unserialize()are done and should probably be reviewed at the same time.