r35959 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35958‎ | r35959 | r35960 >
Date:23:59, 5 June 2008
Author:brion
Status:old
Tags:
Comment:
* Fix regression in cookies from r35932: allow empty $wgCentralAuthCookieDomain to work properly again. Empty doesn't mean don't set a cookie -- it means set it for the current hostname, whatever it is. Destroying this meant that multiple sites on the same domain wouldn't be able to use global cookies, which would break my local test site and secure.wikimedia.org.
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuth.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuth.php
@@ -54,10 +54,10 @@
5555 * For instance, '.wikipedia.org' to work on all wikipedia.org subdomains
5656 * instead of just the current one.
5757 *
58 - * Leave false to set the cookie for the current domain only, such as if
 58+ * Leave blank to set the cookie for the current domain only, such as if
5959 * all your wikis are hosted on the same subdomain.
6060 */
61 -$wgCentralAuthCookieDomain = false;
 61+$wgCentralAuthCookieDomain = '';
6262
6363 /**
6464 * Prefix for CentralAuth global authentication cookies.
Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -448,7 +448,7 @@
449449 */
450450 static function onUserSetCookies( $user, &$session, &$cookies ) {
451451 global $wgCentralAuthCookies, $wgCentralAuthCookieDomain;
452 - if ( !$wgCentralAuthCookies || $wgCentralAuthCookieDomain === false || $user->isAnon() ) {
 452+ if ( !$wgCentralAuthCookies || $user->isAnon() ) {
453453 return true;
454454 }
455455 $centralUser = CentralAuthUser::getInstance( $user );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35932* Fix bug 14347: set CentralAuth cookies on UserSetCookies, instead of after ...tstarling14:50, 5 June 2008

Status & tagging log