[wp-trac] [WordPress Trac] #10205: getmyuid() called instead of posix_getuid() in get_filesystem_method() (wp-admin/includes/file.php)

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 21 20:18:38 UTC 2011


#10205: getmyuid() called instead of posix_getuid() in get_filesystem_method() (wp-
admin/includes/file.php)
------------------------------------+-----------------------------
 Reporter:  pgl                     |       Owner:  dd32
     Type:  defect (bug)            |      Status:  reopened
 Priority:  normal                  |   Milestone:  Future Release
Component:  Filesystem              |     Version:  3.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------------
Changes (by Aikar):

 * cc: Aikar (added)
 * version:  2.8 => 3.0
 * type:  enhancement => defect (bug)


Comment:

 the line "if ( getmyuid() == @fileowner($temp_file_name) )" really just
 needs to be deleted.

 the line above it opens a WRITE handle to the target directory, and
 returns true if the user the script is running as has write permissions to
 that directory.

 If the user has write permissions, thats all wordpress should care about.

 In my case I have my files setup with Access Lists, and the user has
 permissions (var_dump(is_writable('wp-conttent')) returns true), but that
 single line is turning a success condition into a failure.

 We need to simply delete that line, and possibly use is_writable available
 for cleaner code.

 Marking this as bug since my WordPress is not functioning as its expected
 to due to this.

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


More information about the wp-trac mailing list