codeguy / php-the-right-way

An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web
https://www.phptherightway.com
Other
9.03k stars 3.25k forks source link

Update advice for unserializing user input #974

Closed svdv22 closed 1 year ago

svdv22 commented 1 year ago

In chapter 11 (data filtering) it is advised that "If you absolutely must unserialize data from untrusted sources", you can "use PHP 7’s allowed_classes ...".

This is against PHP's own advice as the code might still be executed. See also the warning on unserialize

Xymph commented 1 year ago

Thanks.