[wp-trac] [WordPress Trac] #25822: Upload folder permissions

WordPress Trac noreply at wordpress.org
Wed Jan 1 15:55:00 UTC 2014


#25822: Upload folder permissions
-----------------------------------+-----------------------
 Reporter:  petyo1313              |       Owner:  dd32
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  3.7.2
Component:  Media                  |     Version:  3.7
 Severity:  critical               |  Resolution:
 Keywords:  has-patch fixed-major  |
-----------------------------------+-----------------------

Comment (by fboender):

 There's a bug in the patch (and thus now in the live code) which causes
 the permission-fixing done by wp_mkdir_p to fail. This line:

 {{{
 1381:                if ( $dir_perms != $dir_perms & ~umask() ) {
 }}}

 Shoud be:

 {{{
 1381:                if ( $dir_perms != ($dir_perms & ~umask()) ) {

 }}}

 Right now, the condition is not met properly due to operator precedence.
 This causes the code to re-set the $dir_perms correctly to not be run.

 I can attach a patch if desired.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25822#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list