mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Correctly set the secure flag for the test cookie based on the login URL scheme, and the same for the user settings cookies based on the admin URL scheme.
Fixes #34159 git-svn-id: https://develop.svn.wordpress.org/trunk@34931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -812,7 +812,7 @@ function wp_user_settings() {
|
||||
}
|
||||
|
||||
// The cookie is not set in the current browser or the saved value is newer.
|
||||
$secure = ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) );
|
||||
$secure = ( 'https' === parse_url( admin_url(), PHP_URL_SCHEME ) );
|
||||
setcookie( 'wp-settings-' . $user_id, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH, null, $secure );
|
||||
setcookie( 'wp-settings-time-' . $user_id, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH, null, $secure );
|
||||
$_COOKIE['wp-settings-' . $user_id] = $settings;
|
||||
|
||||
Reference in New Issue
Block a user