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