Changeset 6131
- Timestamp:
- 09/18/2007 10:23:16 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r6094 r6131 397 397 header("Location: $location"); 398 398 } 399 } 400 endif; 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); 399 417 } 400 418 endif; -
trunk/wp-login.php
r6026 r6131 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 … … 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 { -
trunk/wp-pass.php
r3921 r6131 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 ?>
Note: See TracChangeset
for help on using the changeset viewer.