diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 003de1b654..4726b7d745 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -4,6 +4,10 @@ require_once(ABSPATH . 'wp-includes/wp-l10n.php'); require_once(ABSPATH . 'wp-admin/admin-functions.php'); auth_redirect(); +header('Expires: Mon, 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, max-age=0'); +header('Pragma: no-cache'); $dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories"); foreach ($dogs as $catt) { diff --git a/wp-comments-post.php b/wp-comments-post.php index 4c370eedf8..f7f20ba1e6 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -38,7 +38,7 @@ setcookie('comment_author_url_' . COOKIEHASH, stripslashes($url), time() + 30000 header('Expires: Mon, 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('Cache-Control: no-cache, must-revalidate, max-age=0'); header('Pragma: no-cache'); $location = get_permalink($comment_post_ID); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index db0ac91ce6..291af81db2 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1560,10 +1560,10 @@ function auth_redirect() { // Checks if a user is logged in, if not redirects them to the login page if ( (!empty($_COOKIE['wordpressuser_' . COOKIEHASH]) && !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH], true)) || - (empty($_COOKIE['wordpressuser_' . COOKIEHASH])) ) { - header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday + (empty($_COOKIE['wordpressuser_' . COOKIEHASH])) ) { + header('Expires: Mon, 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('Cache-Control: no-cache, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI'])); diff --git a/wp-login.php b/wp-login.php index eece9651fc..b2ceed9b98 100644 --- a/wp-login.php +++ b/wp-login.php @@ -19,6 +19,10 @@ case 'logout': setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH); + header('Expires: Mon, 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, max-age=0'); + header('Pragma: no-cache'); header('Location: wp-login.php'); exit();