mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Merge pull request #51878 from nextcloud/backport/51870/stable29
[stable29] fix: Use login name to check the password
This commit is contained in:
commit
3ecf8cb16e
1 changed files with 2 additions and 1 deletions
|
|
@ -97,7 +97,8 @@ class PasswordConfirmationMiddleware extends Middleware {
|
|||
if ($this->isPasswordConfirmationStrict($reflectionMethod)) {
|
||||
$authHeader = $this->request->getHeader('Authorization');
|
||||
[, $password] = explode(':', base64_decode(substr($authHeader, 6)), 2);
|
||||
$loginResult = $this->userManager->checkPassword($user->getUid(), $password);
|
||||
$loginName = $this->session->get('loginname');
|
||||
$loginResult = $this->userManager->checkPassword($loginName, $password);
|
||||
if ($loginResult === false) {
|
||||
throw new NotConfirmedException();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue