From 50844e8c47f64196a22b1428e0cae509f9f47856 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 1 Dec 2016 14:06:22 +0100 Subject: [PATCH] regenerate session id on successful login, fixes integration test Signed-off-by: Arthur Schiwon --- lib/private/User/Session.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 05b24c8ccff..dca5ff394ac 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -339,6 +339,8 @@ class Session implements IUserSession, Emitter { throw new LoginException($message); } + $this->session->regenerateId(); + $this->setUser($user); $this->setLoginName($loginDetails['loginName']); @@ -560,6 +562,8 @@ class Session implements IUserSession, Emitter { // Ignore and use empty string instead } + $this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); + $user = $this->manager->get($uid); if (is_null($user)) { // user does not exist -- 2.39.5