Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/contacts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnna <anna@nextcloud.com>2022-07-19 11:22:55 +0300
committerGitHub <noreply@github.com>2022-07-19 11:22:55 +0300
commitd59d6f4eab7369235df4a6bb6bf58bd9b6a28066 (patch)
tree363f7598cc20e0476d19a60ea1e3b4a9e7aa2292 /lib
parentc4ebd81a8f916fe737ff6d5e70d46b6d98f43f50 (diff)
parentbf43de1223ed25c831c9700b5bc541b55743588c (diff)
Merge pull request #2765 from nextcloud/bug/2366/add-encoding-for-header
Encode group names for x-property-replace header
Diffstat (limited to 'lib')
-rw-r--r--lib/Dav/PatchPlugin.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Dav/PatchPlugin.php b/lib/Dav/PatchPlugin.php
index 9f4f9d1f..e051ec92 100644
--- a/lib/Dav/PatchPlugin.php
+++ b/lib/Dav/PatchPlugin.php
@@ -28,8 +28,6 @@ namespace OCA\Contacts\Dav;
use Sabre\CardDAV\Card;
use Sabre\DAV;
-use Sabre\DAV\INode;
-use Sabre\DAV\PropPatch;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
@@ -85,9 +83,13 @@ class PatchPlugin extends ServerPlugin {
/**
* Adds all CardDAV-specific properties
*
- * @param PropPatch $propPatch
- * @param INode $node
+ * @param RequestInterface $request
+ * @param ResponseInterface $response
* @return bool
+ * @throws DAV\Exception\BadRequest
+ * @throws DAV\Exception\NotAuthenticated
+ * @throws DAV\Exception\NotFound
+ * @throws \Sabre\DAVACL\Exception\NeedPrivileges
*/
public function httpPatch(RequestInterface $request, ResponseInterface $response): bool {
$path = $request->getPath();
@@ -119,6 +121,8 @@ class PatchPlugin extends ServerPlugin {
}
}
+ $propertyData = rawurldecode($propertyData);
+
// Init contact
$vCard = Reader::read($node->get());
$properties = $vCard->select($propertyName);