Add blog_id to the wp-settings-* cookie (used for storing user state) to prevent it being overloaded on sub-domain sites. Fixes #29095.

git-svn-id: https://develop.svn.wordpress.org/trunk@29362 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2014-08-02 20:08:52 +00:00
parent eedb382924
commit 6bac38232c
3 changed files with 134 additions and 77 deletions

View File

@@ -72,7 +72,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" );
did_action( 'init' ) && $scripts->localize( 'utils', 'userSettings', array(
'url' => (string) SITECOOKIEPATH,
'uid' => (string) get_current_user_id(),
'uid' => get_current_user_id() . '-' . get_current_blog_id(),
'time' => (string) time(),
) );