Bug #71840 [NEW]: Unserialize accepts wrongly data

From: Date: Thu, 17 Mar 2016 04:27:46 +0000
Subject: Bug #71840 [NEW]: Unserialize accepts wrongly data
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199872@lists.php.net to get a copy of this message
From: laruence Operating system: PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:Unserialize accepts wrongly data Description: ------------ This is part of the bug #71824 which is spotted by nikic " var_dump(unserialize('a:1:{s:0:""0a:0:{}}')); ^-- wrong does not fail. That 0 should be a semicolon. We should not be accepting this string. " Test script: --------------- var_dump(unserialize('a:1:{s:0:""0a:0:{}}')); Expected result: ---------------- not accepted Actual result: -------------- accepted -- Edit bug report at https://bugs.php.net/bug.php?id=71840&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71840&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71840&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71840&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71840&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71840&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71840&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71840&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71840&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71840&r=support Expected behavior: https://bugs.php.net/fix.php?id=71840&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71840&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71840&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71840&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71840&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71840&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71840&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71840&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71840&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71840&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71840&r=mysqlcfg

« previous php.bugs (#199872) next »