diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-07-19 08:31:41 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 11:55:37 +0200 |
commit | e783d01da7b5209a4d3bfdb255573b4fc7fbe73c (patch) | |
tree | a79b415a475c9bbb62de95ff0c53bcb9f12cd37e /apps/dav/lib/DAV | |
parent | aadb56dfcceda6981eedcedb2182a101a8b8a43a (diff) | |
download | nextcloud-server-e783d01da7b5209a4d3bfdb255573b4fc7fbe73c.tar.gz nextcloud-server-e783d01da7b5209a4d3bfdb255573b4fc7fbe73c.zip |
Allow public access to the principals/system/public
Diffstat (limited to 'apps/dav/lib/DAV')
-rw-r--r-- | apps/dav/lib/DAV/PublicAuth.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/dav/lib/DAV/PublicAuth.php b/apps/dav/lib/DAV/PublicAuth.php index 41fab614c3d..3f5d37f1a69 100644 --- a/apps/dav/lib/DAV/PublicAuth.php +++ b/apps/dav/lib/DAV/PublicAuth.php @@ -34,7 +34,8 @@ class PublicAuth implements BackendInterface { */ public function __construct() { $this->publicURLs = [ - 'public-calendars' + 'public-calendars', + 'principals/system/public' ]; } @@ -82,7 +83,7 @@ class PublicAuth implements BackendInterface { /** * @param RequestInterface $request - * @return array + * @return bool */ private function isRequestPublic(RequestInterface $request) { $params = $request->getQueryParameters(); @@ -93,6 +94,6 @@ class PublicAuth implements BackendInterface { $matchingUrls = array_filter($this->publicURLs, function ($publicUrl) use ($url) { return strpos($url, $publicUrl, 0) === 0; }); - return $matchingUrls; + return !empty($matchingUrls); } } |