Make WordPress Core


Ignore:
Timestamp:
03/06/2017 01:44:24 PM (10 years ago)
Author:
aaroncampbell
Message:

Strip control characters before validating redirect.

Merges [40183] to 4.0 branch.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/tests/phpunit/tests/formatting/redirect.php

    r36451 r40191  
    5555                        array( 'http://user:@example.com/', 'http://user:@example.com/' ),
    5656                        array( 'http://user:pass@example.com/', 'http://user:pass@example.com/' ),
     57                        array( " \t\n\r\0\x08\x0Bhttp://example.com", 'http://example.com' ),
     58                        array( " \t\n\r\0\x08\x0B//example.com", 'http://example.com' ),
    5759                );
    5860        }
    … …  
    6668                        // non-safelisted domain
    6769                        array( 'http://non-safelisted.example/' ),
     70
     71                        // non-safelisted domain (leading whitespace)
     72                        array( " \t\n\r\0\x08\x0Bhttp://non-safelisted.example.com" ),
     73                        array( " \t\n\r\0\x08\x0B//non-safelisted.example.com" ),
    6874
    6975                        // unsupported schemes
Note: See TracChangeset for help on using the changeset viewer.