Make WordPress Core


Ignore:
Timestamp:
12/01/2014 03:15:24 AM (12 years ago)
Author:
johnbillion
Message:

Allow square brackets in a URL when it's sanitised for a redirect. Square brackets are valid in query parameters and IPv6 addresses.

Fixes #17052
Props voldemortensen

File:
1 edited

Legend:

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

    r30667 r30683  
    11911191 **/
    11921192function wp_sanitize_redirect($location) {
    1193         $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*]|i', '', $location);
     1193        $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]]|i', '', $location);
    11941194        $location = wp_kses_no_null($location);
    11951195
Note: See TracChangeset for help on using the changeset viewer.