diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-08-04 15:52:10 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-12-21 21:17:16 +0100 |
commit | 6abb37317f9a5e0dd4744b0c4a221ee04ffc700f (patch) | |
tree | 0678cb82fa36fb639fd5d905b4b7843296a2c3d0 /lib/private/Authentication | |
parent | c1a99ca58ffdcf37c7f9aaffdb336de45de98231 (diff) | |
download | nextcloud-server-6abb37317f9a5e0dd4744b0c4a221ee04ffc700f.tar.gz nextcloud-server-6abb37317f9a5e0dd4744b0c4a221ee04ffc700f.zip |
Do not setup a session when not required on WebDAV requests
If basic auth is used on WebDAV endpoints, we will not setup a session
by default but instead set a test cookie. Clients which handle session
cookies properly will send back the cookie then on the second request
and a session will be initialized which can be resued for
authentication.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/Manager.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 37a9f03d073..ce732384987 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -42,6 +42,7 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\ISession; use OCP\IUser; +use OCP\Session\Exceptions\SessionNotAvailableException; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; @@ -362,7 +363,7 @@ class Manager { $this->session->set(self::SESSION_UID_DONE, $user->getUID()); return false; } - } catch (InvalidTokenException $e) { + } catch (InvalidTokenException|SessionNotAvailableException $e) { } } |