diff --git a/wp-admin/auth.php b/wp-admin/auth.php index a00b8b3458..59f5f370af 100644 --- a/wp-admin/auth.php +++ b/wp-admin/auth.php @@ -2,7 +2,7 @@ require_once('../wp-config.php'); if ( !empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH) ) { - header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); + header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); diff --git a/wp-login.php b/wp-login.php index 35df65fff6..5c4b1f6179 100644 --- a/wp-login.php +++ b/wp-login.php @@ -36,7 +36,14 @@ for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) { } } } + $error = ''; + +header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); +header('Cache-Control: no-cache, must-revalidate'); +header('Pragma: no-cache'); + // If someone has moved WordPress let's try to detect it if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) != get_settings('siteurl') ) update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) ); @@ -47,10 +54,7 @@ case 'logout': setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); - header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); + if ($is_IIS) header('Refresh: 0;url=wp-login.php'); else @@ -148,11 +152,6 @@ default: $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; } - header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); - if ( wp_login($log, $pwd) ) { $user_login = $log; $user_pass = $pwd; @@ -171,10 +170,6 @@ default: } if ( wp_login($user_login, $user_pass_md5, true) ) { - header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); header('Location: wp-admin/'); exit(); } else {