summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-12-01 14:06:22 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-04-06 15:22:43 +0200
commit50844e8c47f64196a22b1428e0cae509f9f47856 (patch)
treeb5bd4e30cd29dacf6297cd160cd99d2e6bff703a
parent7b3fdfeeaac1ae8e7277ccb0118fd62611c0e302 (diff)
downloadnextcloud-server-50844e8c47f64196a22b1428e0cae509f9f47856.tar.gz
nextcloud-server-50844e8c47f64196a22b1428e0cae509f9f47856.zip
regenerate session id on successful login, fixes integration test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--lib/private/User/Session.php4
1 files changed, 4 insertions, 0 deletions
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