Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-09-19 11:07:33 +0300
committerGitHub <noreply@github.com>2019-09-19 11:07:33 +0300
commit3aa5e613a99e63c1a128e4fe51a5d3f996558f5d (patch)
tree1b313fc77785b5f71687470511cc893860b71f22
parent89143d3746bc4305de8bc57eddc6b07bbb396386 (diff)
parentae4d01dfb0a460f6ef424aebab68dca465404934 (diff)
Merge pull request #17204 from nextcloud/backport/17201/stable17
[stable17] Use the actual password to update the tokens
-rw-r--r--lib/private/Authentication/Login/CreateSessionTokenCommand.php2
-rw-r--r--tests/lib/Authentication/Login/CreateSessionTokenCommandTest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Authentication/Login/CreateSessionTokenCommand.php b/lib/private/Authentication/Login/CreateSessionTokenCommand.php
index 14ad6d18b30..59d5c68a24b 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 136906f42b0..11d2ea36b27 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);