summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/DAV
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-04-23 13:48:39 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-05-27 20:51:36 +0200
commit240006bdf517df0a72d52efb285fdf9cf8b58d35 (patch)
treeaeaf0b40415f5ca2428d54a070378c52a426750a /apps/dav/lib/DAV
parentc5d5c7dc1249f75922f85b99fe1f1d3f799b2793 (diff)
downloadnextcloud-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')
-rw-r--r--apps/dav/lib/DAV/Sharing/Backend.php12
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);
+ }
}
}