[php-src] PR #24025: ext/zip: Reject ZipArchive mutators during close()

From: Date: Wed, 30 Sep 2026 15:53:23 +0000
Subject: [php-src] PR #24025: ext/zip: Reject ZipArchive mutators during close()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39004@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24025 Author: iliaal Follow-up to GH-23749. A progress or cancel callback runs inside zip_close() after libzip has built the list of entries it will write, so changing the archive from the callback is never honored and can crash: deleteIndex(0) from a progress callback segfaults on a freed or NULLed dirent, deleting a later entry makes close() fail with "Internal error" and lose the archive, and additions are silently dropped. Every method that modifies the archive now throws the same "Already being closed" Error that close() and open() raise since GH-23749, through the php_zipobj_closing() helper that already exists on 8.6. Read-only methods are unchanged since libzip already refuses to reopen an entry it is writing. The zip_close() in the destructor does not set the flag; #23779 handles that separately. /cc @devnexen

« previous php.git-pulls (#39004) next »