Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#25771 closed defect (bug) (fixed)

Only check for is_writable() pre-update for the files to which we need to write

Reported by: nacin Owned by: dd32
Priority: normal Milestone: 3.7.2
Component: Upgrade/Install Version:
Severity: normal Keywords: has-patch fixed-major commit
Cc: Focuses:

Description

Before an update, we check the entire list of files in WordPress, based on a list of all checksums, to see if any need changing. If so, we then check to see if the file is writable. The files_not_writable error code occurs when a file we've determined we need to copy over is not writable, even after chmod 0644.

dd32 and I noticed an error condition where an incomplete update to 3.7 resulted in some about page image files not being created in wp-admin/images. For 3.7.1, files_not_writable was thrown because the checksums did not match for those files. But since a partial build was being used, there was no file to actually copy over in the working directory, even if we could write to it.

We should only perform is_writable() pre-update checks for files to which we need to write. If something goes wonky during a previous update, we can try to make sure that doesn't affect a partial build update to 3.7.1.

Attachments (1)

25771.diff (1.4 KB ) - added by nacin 13 years ago.

Download all attachments as: .zip

Change History (5)

@nacin
13 years ago

#1 @dd32
13 years ago

  • Owner set to dd32
  • Resolutionfixed
  • Status newclosed

In 26014:

When checking filesystem permissions for core updates, only check the permissions of the files which we need to alter. Props nacin for initial patch. Fixes #25771 for trunk

#2 @dd32
13 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closedreopened

Still needs back porting

Slight change made, it needed to skip it in a 2nd place, and I synced the wp-content check style in both, we can probably leave out that change for the 3.7 branch.

#3 @dd32
13 years ago

  • Keywords commit added

#4 @nacin
12 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 27882:

When checking filesystem permissions for core updates, only check the permissions of the files which we need to alter.

Merges [26014] from 3.8 to the 3.7 branch.

fixes #25771.

Note: See TracTickets for help on using tickets.