[wp-trac] [WordPress Trac] #60398: WordPress 6.4.3 MacOS Compressed Zip plugin archives "Incompatible Archive" on upload

WordPress Trac noreply at wordpress.org
Wed Jan 31 12:17:12 UTC 2024


#60398: WordPress 6.4.3 MacOS Compressed Zip plugin archives "Incompatible Archive"
on upload
--------------------------+------------------------------
 Reporter:  Endymion00    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Upload        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by TobiasBg):

 Yes, this is caused by [57388].

 In short: The `ZIPARCHIVE::CHECKCONS` flag causes checks to use a
 "pedantic" mode, which Apple's Archive too fails.
 (For some internals from an Apple dev, see
 https://wordpress.org/support/topic/macos-zip-files-made-with-the-built-
 in-archive-utility-arent-accepted/#post-15815401 ).

 This has previously affected WordPress (#12637) and WP-CLI
 (https://github.com/wp-cli/extension-command/issues/362).

 It looks like libzip has a solution already (https://github.com/nih-
 at/libzip/issues/341 and https://github.com/nih-
 at/libzip/commit/b3e3b19e2e4b7d4651d01148f123129429ecc69b) but that will
 probably still need to make its way to servers...

 One solution for Core could be to just repeat the call to `$archive->open(
 $file['file'] )` (but without the `ZIPARCHIVE::CHECKCONS` flag) or to try
 a fallback check with `PclZip` on failure as well (and not just if the
 `ZipArchive` class is not available).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60398#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list