Skip to content

Commit 311ff80

Browse files
committed
Changes for PR28311 required only up to stable25
1 parent 208928c commit 311ff80

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

apps/files/lib/Controller/ViewController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ protected function getStorageInfo() {
158158
/**
159159
* @NoCSRFRequired
160160
* @NoAdminRequired
161+
* @UseSession
161162
*
162163
* @param string $fileid
163164
* @return TemplateResponse|RedirectResponse

lib/private/Authentication/TwoFactorAuth/Manager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use OCP\IConfig;
4343
use OCP\ISession;
4444
use OCP\IUser;
45+
use OCP\Session\Exceptions\SessionNotAvailableException;
4546
use Psr\Log\LoggerInterface;
4647
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
4748
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -362,7 +363,7 @@ public function needsSecondFactor(IUser $user = null): bool {
362363
$this->session->set(self::SESSION_UID_DONE, $user->getUID());
363364
return false;
364365
}
365-
} catch (InvalidTokenException $e) {
366+
} catch (InvalidTokenException|SessionNotAvailableException $e) {
366367
}
367368
}
368369

0 commit comments

Comments
 (0)