[wp-trac] [WordPress Trac] #43417: Infinite loop in wp_mkdir_p with open_basedir restrictions

WordPress Trac noreply at wordpress.org
Mon Feb 26 11:51:27 UTC 2018


#43417: Infinite loop in wp_mkdir_p with open_basedir restrictions
----------------------------------------+------------------------------
 Reporter:  1265578519                  |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Filesystem API              |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------
Changes (by soulseekah):

 * keywords:   => has-patch needs-unit-tests


Comment:

 The test is tough to write, once `ini_set` is called the whole test suite
 breaks. Plus the test can't fail, because it's in an infinite loop, it can
 only pass.

 {{{#!php
 <?php
         /**
          * @ticket 43417
          */
         public function test_wp_mkdir_p_loop() {
                 ini_set( 'open_basedir', '/no/exists/ever' );

                 // suppress open_basedir restriction errors
                 @wp_mkdir_p( '/tmp/try/his' );

                 ini_restore( 'open_basedir' );
         }

 }}}

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


More information about the wp-trac mailing list