Skip to content

Commit c9bd003

Browse files
Merge pull request #49406 from nextcloud/avoidStatusSessions
fix(status): Avoid session creation for status requests
2 parents 38a8547 + 33d7019 commit c9bd003

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/base.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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->getScriptName(), '/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.

0 commit comments

Comments
 (0)