Changeset 5991

Show
Ignore:
Timestamp:
08/30/07 17:46:58 (1 year ago)
Author:
markjaquith
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2/wp-includes/pluggable.php

    r5988 r5991  
    321321    $location = wp_kses_no_null($location); 
    322322 
     323    // remove %0d and %0a from location 
    323324    $strip = array('%0d', '%0a'); 
    324     $location = str_replace($strip, '', $location); 
     325    $found = true; 
     326    while($found) { 
     327        $found = false; 
     328        foreach($strip as $val) { 
     329            while(strpos($location, $val) !== false) { 
     330                $found = true; 
     331                $location = str_replace($val, '', $location); 
     332            } 
     333        } 
     334    } 
    325335 
    326336    if ( $is_IIS ) {