diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-10-23 21:18:02 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-11-30 09:02:05 +0000 |
commit | 23263f9490d718ee200d0ce8ab5a51b8fc0678ce (patch) | |
tree | 6fa278f2431e271f62e26892c45d70c184f672a9 /apps/dav | |
parent | 04364169eda81b1fbc1e303f0cc7326b866cc167 (diff) | |
download | nextcloud-server-23263f9490d718ee200d0ce8ab5a51b8fc0678ce.tar.gz nextcloud-server-23263f9490d718ee200d0ce8ab5a51b8fc0678ce.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>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Principal.php | 4 |
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; } |