File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -425,13 +425,14 @@ public static function initSession(): void {
425425 // TODO: Temporary disabled again to solve issues with CalDAV/CardDAV clients like DAVx5 that use cookies
426426 // TODO: See https://github.com/nextcloud/server/issues/37277#issuecomment-1476366147 and the other comments
427427 // TODO: for further information.
428- // $isDavRequest = strpos($request->getRequestUri(), '/remote.php/dav') === 0 || strpos($request->getRequestUri(), '/remote.php/webdav') === 0;
429- // if ($request->getHeader('Authorization') !== '' && is_null($request->getCookie('cookie_test')) && $isDavRequest && !isset($_COOKIE['nc_session_id'])) {
430- // setcookie('cookie_test', 'test', time() + 3600);
431- // // Do not initialize the session if a request is authenticated directly
432- // // unless there is a session cookie already sent along
433- // return;
434- // }
428+ // MagentaCLOUD stays with original version of the solution from production
429+ $ isDavRequest = strpos ($ request ->getRequestUri (), '/remote.php/dav ' ) === 0 ||
430+ strpos ($ request ->getRequestUri (), '/remote.php/webdav ' ) === 0 ;
431+ if ($ request ->getHeader ('Authorization ' ) !== '' && $ isDavRequest && !isset ($ _COOKIE ['nc_session_id ' ])) {
432+ // Do not initialize the session if a request is authenticated directly
433+ // unless there is a session cookie already sent along
434+ return ;
435+ }
435436
436437 if ($ request ->getServerProtocol () === 'https ' ) {
437438 ini_set ('session.cookie_secure ' , 'true ' );
You can’t perform that action at this time.
0 commit comments