Make WordPress Core


Ignore:
Timestamp:
06/09/2015 03:54:49 AM (11 years ago)
Author:
dd32
Message:

WP_HTTP: ensure that the temporary file is created within the temporary directly when stream is specified without a filename parameter.
Fixes #32549

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/http/base.php

    r31290 r32712  
    189189                        $filesize = filesize( $res['filename'] );
    190190                        unlink( $res['filename'] );
    191                 }               
     191                }
    192192
    193193                $this->assertFalse( is_wp_error( $res ) );
    … …  
    195195                $this->assertEquals( $size, $res['headers']['content-length'] ); // Check the headers are returned (and the size is the same..)
    196196                $this->assertEquals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters
     197                $this->assertStringStartsWith( get_temp_dir(), $res['filename'] ); // Check it's saving within the temp dir
    197198        }
    198199
Note: See TracChangeset for help on using the changeset viewer.