File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,13 +372,14 @@ public static function initSession(): void {
372372 // TODO: Temporary disabled again to solve issues with CalDAV/CardDAV clients like DAVx5 that use cookies
373373 // TODO: See https://github.com/nextcloud/server/issues/37277#issuecomment-1476366147 and the other comments
374374 // TODO: for further information.
375- // $isDavRequest = strpos($request->getRequestUri(), '/remote.php/dav') === 0 || strpos($request->getRequestUri(), '/remote.php/webdav') === 0;
376- // if ($request->getHeader('Authorization') !== '' && is_null($request->getCookie('cookie_test')) && $isDavRequest && !isset($_COOKIE['nc_session_id'])) {
377- // setcookie('cookie_test', 'test', time() + 3600);
378- // // Do not initialize the session if a request is authenticated directly
379- // // unless there is a session cookie already sent along
380- // return;
381- // }
375+ // MagentaCLOUD stays with original version of the solution from production
376+ $ isDavRequest = strpos ($ request ->getRequestUri (), '/remote.php/dav ' ) === 0 ||
377+ strpos ($ request ->getRequestUri (), '/remote.php/webdav ' ) === 0 ;
378+ if ($ request ->getHeader ('Authorization ' ) !== '' && $ isDavRequest && !isset ($ _COOKIE ['nc_session_id ' ])) {
379+ // Do not initialize the session if a request is authenticated directly
380+ // unless there is a session cookie already sent along
381+ return ;
382+ }
382383
383384 if ($ request ->getServerProtocol () === 'https ' ) {
384385 ini_set ('session.cookie_secure ' , 'true ' );
You can’t perform that action at this time.
0 commit comments