Ticket #4606: 4606.002.diff
| File 4606.002.diff, 1.8 kB (added by markjaquith, 1 year ago) |
|---|
-
wp-pass.php
old new 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 ?> -
wp-login.php
old new 78 78 if ( isset( $_REQUEST['redirect_to'] ) ) 79 79 $redirect_to = $_REQUEST['redirect_to']; 80 80 81 wp_ redirect($redirect_to);81 wp_safe_redirect($redirect_to); 82 82 exit(); 83 83 84 84 break; … … 324 324 if ( !$using_cookie ) 325 325 wp_setcookie($user_login, $user_pass, false, '', '', $rememberme); 326 326 do_action('wp_login', $user_login); 327 wp_ redirect($redirect_to);327 wp_safe_redirect($redirect_to); 328 328 exit(); 329 329 } else { 330 330 if ( $using_cookie ) -
wp-includes/pluggable.php
old new 399 399 } 400 400 endif; 401 401 402 if ( !function_exists('wp_safe_redirect') ) : 403 /** 404 * performs a safe (local) redirect, using wp_redirect() 405 * @return void 406 **/ 407 function wp_safe_redirect($location, $status = 302) { 408 if ( $location{0} == '/' ) { 409 if ( $location{1} == '/' ) 410 $location = get_option('home') . '/'; 411 } else { 412 if ( substr($location, 0, strlen(get_option('home'))) != get_option('home') ) 413 $location = get_option('home') . '/'; 414 } 415 416 wp_redirect($location, $status); 417 } 418 endif; 419 402 420 if ( !function_exists('wp_get_cookie_login') ): 403 421 function wp_get_cookie_login() { 404 422 if ( empty($_COOKIE[USER_COOKIE]) || empty($_COOKIE[PASS_COOKIE]) )
