WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13491 closed defect (bug) (fixed)

Wrong logic used within ZipArchive

Reported by: dd32 Owned by: dd32
Milestone: 3.0 Priority: normal
Severity: major Version: 3.0
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

Apparently no-one else noticed, The logic employed in [14346] and subsequently [14377] is wrong(Added in #12637). ZipArchive has not been used in the wild for 3 weeks because of that.

Take $zopen = true, Fails the first check, passes the 2nd check, returns invalid archive.

&& > || sometimes.

I'm going to commit a fix for it now, but due to the limited testing recieved, I'm thinking its going to be best to make ZipArchive opt-in for 3.0, and make it opt-out again in 3.1 trunk.

The possible issues that could arise are certain configurations which I've not tested or which were not tested by the community that for one reason or another, fail to uncompress properly using ZipArchive, Whilst I believe the chances of the archive being opened without error, and then failing to be highly rare, the result would be that either the upgrade to 3.0.1 may fail (causing them to have to install a plugin to disable ZipArchive, or perform a manual upgrade), or that plugin/theme upgrades/installs would error out.

The work around of (manually) installing a plugin in case of an ZipArchive error would be something that users would have to do regardless right now if it was working for all testing users..

Change History (4)

comment:1 dd324 years ago

(In [14800]) Correct the ZipArchive opening test logic. See #13491

comment:2 markjaquith4 years ago

dd32 — closable?

comment:3 dd324 years ago

  • Keywords dev-feedback removed
  • Resolution set to fixed
  • Status changed from new to closed

Closing as fixed. Re-open if a issue arrises during RC.

comment:4 automattor4 years ago

(In [15052]) Always fallback to PclZip in the event that ZipArchive does not return true. The PHP Zip extension is hit-and-miss with OSX generated zip files, sometimes 0 will be emitted and extraction will succeed, others it will fail with. Reverts r14346, r14377, partially r14800. See #12637. See #13491

Note: See TracTickets for help on using tickets.