AuthManager::setDefaultUserOptions and LoginForm::initUser shouldn't invalidate CA...
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 2 Jun 2016 19:26:14 +0000 (15:26 -0400)
committerAnomie <bjorsch@wikimedia.org>
Thu, 2 Jun 2016 19:35:27 +0000 (19:35 +0000)
commit50b6fb32fb5b63c09acb57452f115062c6639209
tree1ad861ea25413ed58ce5428afa998ee74b84add7
parent476a926d79225402de952ec6977d2260e356d2f8
AuthManager::setDefaultUserOptions and LoginForm::initUser shouldn't invalidate CA tokens

We only want to set the local user_token when we create the local
account. We don't want to invalidate all existing CentralAuth sessions
for the user just because they happened to visit a new wiki and get
an account auto-created.

This might also fix T136853. It looks like what's going on there is that
two jobs are both in this code path calling CentralAuth::resetAuthToken()
at the same time, leading to a race and one fails the CAS check.

Bug: T136834
Change-Id: I61b8253584a11a5b02f7ccb9efa0679cd2a822c6
includes/auth/AuthManager.php
includes/specials/pre-authmanager/SpecialUserlogin.php