Skip to content

Commit 84b59c4

Browse files
artongebackportbot[bot]
authored andcommitted
fix: Use login name to check the password
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent 0ef3932 commit 84b59c4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ public function beforeController(Controller $controller, string $methodName) {
8080
if ($this->isPasswordConfirmationStrict($reflectionMethod)) {
8181
$authHeader = $this->request->getHeader('Authorization');
8282
[, $password] = explode(':', base64_decode(substr($authHeader, 6)), 2);
83-
$loginResult = $this->userManager->checkPassword($user->getUid(), $password);
83+
$loginName = $this->session->get('loginname');
84+
$loginResult = $this->userManager->checkPassword($loginName, $password);
8485
if ($loginResult === false) {
8586
throw new NotConfirmedException();
8687
}

0 commit comments

Comments
 (0)