Make WordPress Core


Ignore:
Timestamp:
08/22/2015 05:04:17 PM (9 years ago)
Author:
wonderboymusic
Message:

In wp_sanitize_redirect(), don't eat @ characters. According to RFC 3986, "@" is a perfectly valid character in a URL path or query string.

Adds unit test.

Props markjaquith.
Fixes #18818.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r33664 r33707  
    12331233        )/x';
    12341234    $location = preg_replace_callback( $regex, '_wp_sanitize_utf8_in_redirect', $location );
    1235     $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()]|i', '', $location);
     1235    $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()@]|i', '', $location);
    12361236    $location = wp_kses_no_null($location);
    12371237
Note: See TracChangeset for help on using the changeset viewer.