File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,13 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
363363 public static function initSession (): void {
364364 $ request = Server::get (IRequest::class);
365365
366+ // Do not initialize sessions for 'status.php' requests
367+ // Monitoring endpoints can quickly flood session handlers
368+ // and 'status.php' doesn't require sessions anyway
369+ if (str_ends_with ($ request ->getRequestUri (), '/status.php ' )) {
370+ return ;
371+ }
372+
366373 // TODO: Temporary disabled again to solve issues with CalDAV/CardDAV clients like DAVx5 that use cookies
367374 // TODO: See https://github.com/nextcloud/server/issues/37277#issuecomment-1476366147 and the other comments
368375 // TODO: for further information.
@@ -790,7 +797,7 @@ public static function init(): void {
790797 $ isScssRequest = true ;
791798 }
792799
793- if (substr ($ request ->getRequestUri (), - 11 ) === '/status.php ' ) {
800+ if (str_ends_with ($ request ->getRequestUri (), '/status.php ' ) ) {
794801 http_response_code (400 );
795802 header ('Content-Type: application/json ' );
796803 echo '{"error": "Trusted domain error.", "code": 15} ' ;
You can’t perform that action at this time.
0 commit comments