Bug #70752 [NEW]: Depacking with wrong password leaves 0 length files

From: Date: Tue, 20 Oct 2015 20:26:51 +0000
Subject: Bug #70752 [NEW]: Depacking with wrong password leaves 0 length files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196712@lists.php.net to get a copy of this message
From: furun at arcor dot de Operating system: all PHP version: 5.6.14 Package: Zip Related Bug Type: Bug Bug description:Depacking with wrong password leaves 0 length files Description: ------------ --- From manual page: http://www.php.net/ziparchive.setpassword --- If a file is de-packed with ZipArchive::setPassword, and the password is wrong, it leafs a file with 0 length. In case a file exist already with the same name like the unpacked one, this file will be overwritten with 0 length content. This behavior is unclean. In case a password is wrong, no files should be created or changed. For Example: If ZipArchive is used to update content in a secure way, a wrong password would destroy the existing files. Exactly what the password protection of the updater file should avoid. And, There is no way to check a password before using it (... i guess) -- Edit bug report at https://bugs.php.net/bug.php?id=70752&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70752&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70752&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70752&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70752&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70752&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70752&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70752&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70752&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70752&r=support Expected behavior: https://bugs.php.net/fix.php?id=70752&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70752&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70752&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70752&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70752&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70752&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70752&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70752&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70752&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70752&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70752&r=mysqlcfg

« previous php.bugs (#196712) next »