[Pkg-owncloud-commits] [php-sabredav] 23/34: expand-property REPORT did not correct prepend the server base uri.

David Prévot taffit at moszumanska.debian.org
Wed May 27 13:57:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 3.0.0-beta1
in repository php-sabredav.

commit df93d6c4ff806cd1355b618278abe0d7f2d38ae9
Author: Evert Pot <me at evertpot.com>
Date:   Mon May 25 18:33:01 2015 -0400

    expand-property REPORT did not correct prepend the server base uri.
    
    Fixes #666
---
 CHANGELOG.md          | 2 ++
 lib/CalDAV/Plugin.php | 6 ++++--
 lib/DAVACL/Plugin.php | 3 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0cf1b0..f7067d6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ ChangeLog
 * #662: Fixed several bugs in the `share` request parser.
 * #665: Fix a bug in serialization of complex properties in the proppatch
   request in the client.
+* #666: expand-property report did not correctly prepend the base uri when
+  generating uris, this caused delegation to break.
 
 
 3.0.0-alpha1 (2015-05-19)
diff --git a/lib/CalDAV/Plugin.php b/lib/CalDAV/Plugin.php
index 37174d1..b3b9c70 100644
--- a/lib/CalDAV/Plugin.php
+++ b/lib/CalDAV/Plugin.php
@@ -368,14 +368,16 @@ class Plugin extends DAV\ServerPlugin {
 
                     $groupNode = $this->server->tree->getNodeForPath($group);
 
+                    $listItem = Uri\split($group)[0] . '/';
+
                     // If the node is either ap proxy-read or proxy-write
                     // group, we grab the parent principal and add it to the
                     // list.
                     if ($groupNode instanceof Principal\IProxyRead) {
-                        list($readList[]) = Uri\split($group);
+                        $readList[] = $listItem;
                     }
                     if ($groupNode instanceof Principal\IProxyWrite) {
-                        list($writeList[]) = Uri\split($group);
+                        $writeList[] = $listItem;
                     }
 
                 }
diff --git a/lib/DAVACL/Plugin.php b/lib/DAVACL/Plugin.php
index 18e760f..b237512 100644
--- a/lib/DAVACL/Plugin.php
+++ b/lib/DAVACL/Plugin.php
@@ -1116,7 +1116,8 @@ class Plugin extends DAV\ServerPlugin {
 
         $xml = $this->server->xml->write(
             '{DAV:}multistatus',
-            new DAV\Xml\Response\MultiStatus($result)
+            new DAV\Xml\Response\MultiStatus($result),
+            $this->server->getBaseUri()
         );
         $this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');
         $this->server->httpResponse->setStatus(207);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list