SessionManager: Notify AuthPlugin before calling hooks
authorBrad Jorsch <bjorsch@wikimedia.org>
Sun, 31 Jan 2016 20:48:23 +0000 (15:48 -0500)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 1 Feb 2016 06:43:29 +0000 (06:43 +0000)
commit6acd424e0dbc322e8b9a141bd2625453c1b9b6f1
tree6c5c878a7015e98881bac00fbacafcacabbf1b8b
parent7d1073330cde29c9fb197d5e4d3c88fd12014418
SessionManager: Notify AuthPlugin before calling hooks

This avoids a race in CentralAuth:
* The user doesn't exist locally, so CA wants to create it
* Auto-creation adds the user to the database
* A hook function tries to access the session; now the user does exist
  locally but isn't yet attached, so CA rejects the session.

Bug: T125283
Change-Id: I6024885e3cf9c85c527fc160577f66ff97451c98
includes/session/SessionManager.php