Make WordPress Core


Ignore:
Timestamp:
08/30/2007 05:46:09 PM (19 years ago)
Author:
markjaquith
Message:

Better %0d/%0a sanitization for wp_redirect() from hakre. fixes #4819 for trunk

File:
1 edited

Legend:

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

    r5986 r5990  
    402402    $location = wp_kses_no_null($location);
    403403
     404    // remove %0d and %0a from location
    404405    $strip = array('%0d', '%0a');
    405     $location = str_replace($strip, '', $location);
     406    $found = true;
     407    while($found) {
     408        $found = false;
     409        foreach($strip as $val) {
     410            while(strpos($location, $val) !== false) {
     411                $found = true;
     412                $location = str_replace($val, '', $location);
     413            }
     414        }
     415    }
    406416
    407417    if ( $is_IIS ) {
Note: See TracChangeset for help on using the changeset viewer.