[wp-trac] [WordPress Trac] #36710: Symlinked directories should not be deleted recursively

WordPress Trac noreply at wordpress.org
Sun Jul 7 15:28:29 UTC 2019


#36710: Symlinked directories should not be deleted recursively
------------------------------------+-----------------------------
 Reporter:  andy                    |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Filesystem API          |     Version:
 Severity:  major                   |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  administration
------------------------------------+-----------------------------

Comment (by Dreamsorcerer):

 I don't have everything setup right now, in order to test this properly.

 However, when I wrote this patch, I simply followed the traceback and
 fixed the errors where needed, so if there was a 2nd is_writable() call,
 it didn't cause any errors (for me). If you can check if the call existed
 on whichever WP version was around 21 months ago (according to the diff
 upload date), then that would answer your question.

 I did a quick test on my server, to see how is_writable() is working, and
 it looks like it now returns true on a symlink (maybe it was an issue with
 PHP 5...):

 {{{
 # touch a
 # ln -s a b
 # ls -l
 total 65340
 -rw-r--r-- 1 root root        0 Jul  7 16:12 a
 lrwxrwxrwx 1 root root        1 Jul  7 16:12 b -> a
 # php --version
 PHP 7.3.4-2 (cli) (built: Apr 13 2019 19:05:48) ( NTS )
 Copyright (c) 1997-2018 The PHP Group
 Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
     with Zend OPcache v7.3.4-2, Copyright (c) 1999-2018, by Zend
 Technologies
 # php -a
 php > print(is_writable('a'));
 1
 php > print(is_writable('b'));
 1
 }}}

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


More information about the wp-trac mailing list