From 210a0554a2b99166e7875da87594e3d548df72d7 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 18 Sep 2019 19:46:21 +0200 Subject: [PATCH] Use the actual password to update the tokens Signed-off-by: Roeland Jago Douma --- .../Authentication/Login/CreateSessionTokenCommand.php | 2 +- .../Authentication/Login/CreateSessionTokenCommandTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Authentication/Login/CreateSessionTokenCommand.php b/lib/private/Authentication/Login/CreateSessionTokenCommand.php index 14ad6d18b3..59d5c68a24 100644 --- a/lib/private/Authentication/Login/CreateSessionTokenCommand.php +++ b/lib/private/Authentication/Login/CreateSessionTokenCommand.php @@ -59,7 +59,7 @@ class CreateSessionTokenCommand extends ALoginCommand { ); $this->userSession->updateTokens( $loginData->getUser()->getUID(), - $loginData->getUsername() + $loginData->getPassword() ); return $this->processNextOrFinishSuccessfully($loginData); diff --git a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php index 136906f42b..11d2ea36b2 100644 --- a/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php +++ b/tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php @@ -76,7 +76,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest { ->method('updateTokens') ->with( $this->username, - $this->username + $this->password ); $result = $this->cmd->process($data); @@ -109,7 +109,7 @@ class CreateSessionTokenCommandTest extends ALoginCommandTest { ->method('updateTokens') ->with( $this->username, - $this->username + $this->password ); $result = $this->cmd->process($data);