File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -833,9 +833,8 @@ public function tryTokenLogin(IRequest $request) {
833833 return true ;
834834 }
835835
836- // Remember me tokens are not app_passwords
837- if ($ dbToken ->getRemember () === IToken::DO_NOT_REMEMBER ) {
838- // Set the session variable so we know this is an app password
836+ // Set the session variable so we know this is an app password
837+ if ($ dbToken instanceof PublicKeyToken && $ dbToken ->getType () === IToken::PERMANENT_TOKEN ) {
839838 $ this ->session ->set ('app_password ' , $ token );
840839 }
841840
Original file line number Diff line number Diff line change 3434use OCP \Security \Bruteforce \IThrottler ;
3535use OCP \Security \ISecureRandom ;
3636use OCP \User \Events \PostLoginEvent ;
37+ use PHPUnit \Framework \ExpectationFailedException ;
3738use PHPUnit \Framework \MockObject \MockObject ;
3839use Psr \Log \LoggerInterface ;
3940use function array_diff ;
You can’t perform that action at this time.
0 commit comments