[wp-trac] [WordPress Trac] #35996: wp_normalize_path() not working with DFS on Windows hosting

WordPress Trac noreply at wordpress.org
Mon Feb 29 05:37:29 UTC 2016


#35996: wp_normalize_path() not working with DFS on Windows hosting
--------------------------+-----------------------------
 Reporter:  rilwis        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 [https://en.wikipedia.org/wiki/Distributed_File_System_(Microsoft) DFS on
 Windows hosting] sets up the file path like this:


 {{{
 \\WDP\DFS\45\2\5\8\4513111852\user\sites\1627032.site\www
 }}}


 (Note the double forward slashes at the beginning).

 After running wp_normalize_path(), the function returns

 {{{
 /WDP/DFS/45/2/5/8/4513111852/user/sites/1627032.site/www
 }}}

 which is a wrong path on DFS. If users use include or require function,
 then a warning or fatal error will be thrown:

 {{{#!php
 require wp_normalize_path( __DIR__ ) . 'phpinfo.php';
 }}}

 The patch simply ignore double slashes at the beginning.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35996>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list