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 @@ -420,13 +420,14 @@ public static function initSession(): void {
420420		// TODO: Temporary disabled again to solve issues with CalDAV/CardDAV clients like DAVx5 that use cookies 
421421		// TODO: See https://github.com/nextcloud/server/issues/37277#issuecomment-1476366147 and the other comments 
422422		// TODO: for further information. 
423- 		// $isDavRequest = strpos($request->getRequestUri(), '/remote.php/dav') === 0 || strpos($request->getRequestUri(), '/remote.php/webdav') === 0; 
424- 		// if ($request->getHeader('Authorization') !== '' && is_null($request->getCookie('cookie_test')) && $isDavRequest && !isset($_COOKIE['nc_session_id'])) { 
425- 		// setcookie('cookie_test', 'test', time() + 3600); 
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- 		// } 
423+         // MagentaCLOUD stays with original version of the solution from production 
424+ 		$ isDavRequeststrpos ($ requestgetRequestUri (), '/remote.php/dav ' ) === 0  || 
425+                            strpos ($ requestgetRequestUri (), '/remote.php/webdav ' ) === 0 ;
426+ 		if  ($ requestgetHeader ('Authorization ' ) !== ''  && $ isDavRequestisset ($ _COOKIE 'nc_session_id ' ])) {
427+ 		   // Do not initialize the session if a request is authenticated directly 
428+ 		   // unless there is a session cookie already sent along 
429+ 		   return ;
430+ 		}
430431
431432		if  ($ requestgetServerProtocol () === 'https ' ) {
432433			ini_set ('session.cookie_secure ' , 'true ' );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments