Make WordPress Core


Ignore:
Timestamp:
08/29/2016 02:32:48 AM (8 years ago)
Author:
dd32
Message:

HTTP: Handle an edgecase within the URI parsing library included in Requests, where if a double slash exists at the start of the path the URL is passed to cURL malformed.

Props flixos90 for initial patch.
Fixes #37733 for trunk.

File:
1 edited

Legend:

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

    r38416 r38429  
    377377    }
    378378
     379    /**
     380     * @ticket 37733
     381     */
     382    function test_url_with_double_slashes_path() {
     383        $url = $this->redirection_script . '?rt=' . 0;
     384
     385        $path = parse_url( $url, PHP_URL_PATH );
     386        $url = str_replace( $path, '/' . $path, $url );
     387
     388        $res = wp_remote_request( $url );
     389        $this->assertNotWPError( $res );
     390    }
     391
    379392
    380393}
Note: See TracChangeset for help on using the changeset viewer.