From a724d77a4e8a75284e658adde5bf16e4c1642b4e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 26 May 2018 12:43:23 +0000 Subject: [PATCH] Posts, Post Types: Clear post password cookie when logging out. Props skoldin, subrataemfluence, ianbelanger, johnbillion. Fixes #44089. Built from https://develop.svn.wordpress.org/trunk@43317 git-svn-id: http://core.svn.wordpress.org/trunk@43146 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 9936858ef7..535e295276 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -976,6 +976,9 @@ if ( ! function_exists( 'wp_clear_auth_cookie' ) ) : setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); + + // Post password cookie + setcookie( 'wp-postpass_' . COOKIEHASH, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN ); } endif; diff --git a/wp-includes/version.php b/wp-includes/version.php index 0129f08037..5ab1215644 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43315'; +$wp_version = '5.0-alpha-43317'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.