diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-04-23 13:48:39 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-27 20:51:36 +0200 |
commit | 240006bdf517df0a72d52efb285fdf9cf8b58d35 (patch) | |
tree | aeaf0b40415f5ca2428d54a070378c52a426750a /apps/dav/lib/DAV/Sharing | |
parent | c5d5c7dc1249f75922f85b99fe1f1d3f799b2793 (diff) | |
download | nextcloud-server-240006bdf517df0a72d52efb285fdf9cf8b58d35.tar.gz nextcloud-server-240006bdf517df0a72d52efb285fdf9cf8b58d35.zip |
When sharing calendars and addressbooks the principal has to be verified to be valid
https://github.com/owncloud/core/pull/30149/commits/d3fb8fcdd3a6b00bde0c3c9eb4039876e7fc1967
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib/DAV/Sharing')
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Backend.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 87c094c6d62..433d9db9c08 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -67,12 +67,18 @@ class Backend { * @param string[] $add * @param string[] $remove */ - public function updateShares($shareable, $add, $remove) { + public function updateShares(IShareable $shareable, array $add, array $remove) { foreach($add as $element) { - $this->shareWith($shareable, $element); + $principal = $this->principalBackend->findByUri($element['href'], ''); + if ($principal !== '') { + $this->shareWith($shareable, $element); + } } foreach($remove as $element) { - $this->unshare($shareable, $element); + $principal = $this->principalBackend->findByUri($element, ''); + if ($principal !== '') { + $this->unshare($shareable, $element); + } } } |