File tree 2 files changed +3
-1
lines changed
apps/files/lib/Controller
lib/private/Authentication/TwoFactorAuth
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ protected function getStorageInfo() {
158
158
/**
159
159
* @NoCSRFRequired
160
160
* @NoAdminRequired
161
+ * @UseSession
161
162
*
162
163
* @param string $fileid
163
164
* @return TemplateResponse|RedirectResponse
Original file line number Diff line number Diff line change 42
42
use OCP \IConfig ;
43
43
use OCP \ISession ;
44
44
use OCP \IUser ;
45
+ use OCP \Session \Exceptions \SessionNotAvailableException ;
45
46
use Psr \Log \LoggerInterface ;
46
47
use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
47
48
use Symfony \Component \EventDispatcher \GenericEvent ;
@@ -362,7 +363,7 @@ public function needsSecondFactor(IUser $user = null): bool {
362
363
$ this ->session ->set (self ::SESSION_UID_DONE , $ user ->getUID ());
363
364
return false ;
364
365
}
365
- } catch (InvalidTokenException $ e ) {
366
+ } catch (InvalidTokenException | SessionNotAvailableException $ e ) {
366
367
}
367
368
}
368
369
You can’t perform that action at this time.
0 commit comments