WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #37670


Ignore:
Timestamp:
08/15/2016 03:21:51 PM (5 years ago)
Author:
ocean90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37670 – Description

    initial v1  
    11$allowed_hosts is checking againts host value the parsed host value doesn't contain the port number and $wpp does. Thereror hosts aren't matched and wp_validate_redirect fails.
    22
    3     $lp = @parse_url($test);
     3
     4{{{
     5$lp = @parse_url($test);
     6}}}
     7
    48
    59equals
    610
     11
     12{{{
    713array (size=4)
    814  'scheme' => string 'http' (length=4)
     
    1016  'port' => int 3002
    1117  'path' => string '/project/xactly-com/insights/' (length=29)
     18}}}
     19
    1220
    1321where
    1422
    15     $wpp = parse_url(home_url());
     23
     24{{{
     25$wpp = parse_url(home_url());
     26}}}
     27
    1628
    1729equals
    1830
     31
     32{{{
    1933array (size=2)
    2034  'scheme' => string 'http' (length=4)
    2135  'host' => string 'localhost:3002' (length=23)
     36}}}
    2237
    2338
    2439will result in
    2540
    26     if (isset($lp['host']) && (!in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host']))) {
    27  
     41
     42{{{
     43if (isset($lp['host']) && (!in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host']))) {
     44}}}
     45
    2846
    2947failing