aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2024-11-22 10:41:31 +0100
committerGitHub <noreply@github.com>2024-11-22 10:41:31 +0100
commitc9bd0039f1119fc97ee845f964ef2119c8867205 (patch)
tree00d2a0f5a14247586801a797f0d4b90a077565d3
parent38a854752cd557789552bd3a8ab48d190f2057d1 (diff)
parent33d7019f589488d564041307da553d38ba66bd42 (diff)
downloadnextcloud-server-c9bd0039f1119fc97ee845f964ef2119c8867205.tar.gz
nextcloud-server-c9bd0039f1119fc97ee845f964ef2119c8867205.zip
Merge pull request #49406 from nextcloud/avoidStatusSessions
fix(status): Avoid session creation for status requests
-rw-r--r--lib/base.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 53231999e81..b0334ecd729 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -363,6 +363,13 @@ class OC {
public static function initSession(): void {
$request = Server::get(IRequest::class);
+ // Do not initialize sessions for 'status.php' requests
+ // Monitoring endpoints can quickly flood session handlers
+ // and 'status.php' doesn't require sessions anyway
+ if (str_ends_with($request->getScriptName(), '/status.php')) {
+ return;
+ }
+
// TODO: Temporary disabled again to solve issues with CalDAV/CardDAV clients like DAVx5 that use cookies
// TODO: See https://github.com/nextcloud/server/issues/37277#issuecomment-1476366147 and the other comments
// TODO: for further information.