Ticket #4606: wp2-4606.002.diff
File wp2-4606.002.diff, 1.9 KB (added by , 17 years ago) |
---|
-
wp-includes/pluggable-functions.php
284 284 } 285 285 endif; 286 286 287 if ( !function_exists('wp_safe_redirect') ) : 288 /** 289 * performs a safe (local) redirect, using wp_redirect() 290 * @return void 291 **/ 292 function wp_safe_redirect($location, $status = 302) { 293 if ( $location{0} == '/' ) { 294 if ( $location{1} == '/' ) 295 $location = get_option('home') . '/'; 296 } else { 297 if ( substr($location, 0, strlen(get_option('home'))) != get_option('home') ) 298 $location = get_option('home') . '/'; 299 } 300 301 wp_redirect($location, $status); 302 } 303 endif; 304 287 305 if ( !function_exists('wp_get_cookie_login') ): 288 306 function wp_get_cookie_login() { 289 307 if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) ) -
wp-login.php
29 29 if ( isset($_REQUEST['redirect_to']) ) 30 30 $redirect_to = $_REQUEST['redirect_to']; 31 31 32 wp_ redirect($redirect_to);32 wp_safe_redirect($redirect_to); 33 33 exit(); 34 34 35 35 break; … … 198 198 if ( !$using_cookie ) 199 199 wp_setcookie($user_login, $user_pass, false, '', '', $rememberme); 200 200 do_action('wp_login', $user_login); 201 wp_ redirect($redirect_to);201 wp_safe_redirect($redirect_to); 202 202 exit; 203 203 } else { 204 204 if ( $using_cookie ) -
wp-pass.php
7 7 // 10 days 8 8 setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH); 9 9 10 wp_ redirect(wp_get_referer());10 wp_safe_redirect(wp_get_referer()); 11 11 ?> 12 No newline at end of file