From c5ea1618afcdfee2e1ae55d7e2bde27ada7da24e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 12 Sep 2019 09:10:03 +0200 Subject: [PATCH] CalDAV/CardDAV: fix not working creation of new contacts in MacOS Addressbook OSX Addressbook sends ?add-member url-encoded --- api/src/CalDAV.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/src/CalDAV.php b/api/src/CalDAV.php index bab6b23253..56c7c81dad 100644 --- a/api/src/CalDAV.php +++ b/api/src/CalDAV.php @@ -263,11 +263,12 @@ class CalDAV extends HTTP_WebDAV_Server parent::__construct(); // hack to allow to use query parameters in WebDAV, which HTTP_WebDAV_Server interprets as part of the path list($this->_SERVER['REQUEST_URI']) = explode('?',$this->_SERVER['REQUEST_URI']); - /*if (substr($this->_SERVER['REQUEST_URI'],-13) == '/;add-member/') + // OSX Addressbook sends ?add-member url-encoded + if (substr($this->_SERVER['REQUEST_URI'], -14) == '/%3Fadd-member') { $_GET['add-member'] = ''; - $this->_SERVER['REQUEST_URI'] = substr($this->_SERVER['REQUEST_URI'],0,-12); - }*/ + $this->_SERVER['REQUEST_URI'] = substr($this->_SERVER['REQUEST_URI'], 0, -14); + } //error_log($_SERVER['REQUEST_URI']." --> ".$this->_SERVER['REQUEST_URI']); $this->egw_charset = Translation::charset();