mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 02:00:51 -04:00
Merge pull request #24565 from nextcloud/backport/24552/stable18
[stable18] Remember me is not an app_password
This commit is contained in:
commit
4ec5b3a82e
1 changed files with 12 additions and 2 deletions
|
|
@ -825,8 +825,18 @@ class Session implements IUserSession, Emitter {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Set the session variable so we know this is an app password
|
||||
$this->session->set('app_password', $token);
|
||||
try {
|
||||
$dbToken = $this->tokenProvider->getToken($token);
|
||||
} catch (InvalidTokenException $e) {
|
||||
// Can't really happen but better save than sorry
|
||||
return true;
|
||||
}
|
||||
|
||||
// Remember me tokens are not app_passwords
|
||||
if ($dbToken->getRemember() === IToken::DO_NOT_REMEMBER) {
|
||||
// Set the session variable so we know this is an app password
|
||||
$this->session->set('app_password', $token);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue