We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0d7819e + 5cc348a commit f0862dcCopy full SHA for f0862dc
1 file changed
lib/private/User/Session.php
@@ -832,8 +832,18 @@ public function tryTokenLogin(IRequest $request) {
832
return false;
833
}
834
835
- // Set the session variable so we know this is an app password
836
- $this->session->set('app_password', $token);
+ try {
+ $dbToken = $this->tokenProvider->getToken($token);
837
+ } catch (InvalidTokenException $e) {
838
+ // Can't really happen but better save than sorry
839
+ return true;
840
+ }
841
+
842
+ // Remember me tokens are not app_passwords
843
+ if ($dbToken->getRemember() === IToken::DO_NOT_REMEMBER) {
844
+ // Set the session variable so we know this is an app password
845
+ $this->session->set('app_password', $token);
846
847
848
return true;
849
0 commit comments