[wp-trac] [WordPress Trac] #48316: Changeset 46482 breaks upload when using ".." in upload_path.

WordPress Trac noreply at wordpress.org
Thu Oct 24 04:28:17 UTC 2019


#48316: Changeset 46482 breaks upload when using ".." in upload_path.
----------------------------+------------------------------
 Reporter:  xpoon           |       Owner:  (none)
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Filesystem API  |     Version:  trunk
 Severity:  major           |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by DreadLox):

 Also I am wondering why this has been done, why not using the WP built in
 function in the same file ?

 {{{#!php
 <?php

 if ( false !== strpos( $target, '../' ) || false !== strpos( $target, '..'
 . DIRECTORY_SEPARATOR ) )
 }}}

 Instead of:

 {{{#!php
 <?php
 if( 1 === validate_file( $target ) )
 }}}

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


More information about the wp-trac mailing list