summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-10-23 21:18:02 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-11-26 09:00:09 +0100
commit35098a99738b2149c65318b39400d6dafa6541c1 (patch)
treef66908c96f1f891899217b2c248be450d4b1df45
parentefef6e9b784da39a8676e3f9ec721c8659aaf9e6 (diff)
downloadnextcloud-server-35098a99738b2149c65318b39400d6dafa6541c1.tar.gz
nextcloud-server-35098a99738b2149c65318b39400d6dafa6541c1.zip
A valid user session is required for circles.
The circles app depends on a valid userId. A public shared calender might be viewed by guests without a user session. For such requests the principal is null. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index 14bb8798630..5dedb0a7d7b 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -178,7 +178,9 @@ class Principal implements BackendInterface {
return $this->userToPrincipal($user);
}
} elseif ($prefix === 'principals/circles') {
- return $this->circleToPrincipal($name);
+ if ($this->userSession->getUser() !== null) {
+ return $this->circleToPrincipal($name);
+ }
}
return null;
}