From e292220ad2060246adee936c5d9296885ea44bc1 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sat, 25 Sep 2021 23:38:10 +0200 Subject: [PATCH 1/2] fix: fix dav client rfc2518 section 15.1 --- app/Services/DavClient/Utils/AddressBookGetter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/DavClient/Utils/AddressBookGetter.php b/app/Services/DavClient/Utils/AddressBookGetter.php index 94d66110e06..89ac5499b29 100644 --- a/app/Services/DavClient/Utils/AddressBookGetter.php +++ b/app/Services/DavClient/Utils/AddressBookGetter.php @@ -116,7 +116,10 @@ private function checkOptions() { $options = $this->client->options(); if (! empty($options)) { - $options = explode(', ', $options[0]); + $options = array_map(function ($option) { + return explode(', ', $option); + }, $options); + $options = Arr::flatten($options); } if (! in_array('1', $options) || ! in_array('3', $options) || ! in_array('addressbook', $options)) { From bed40224adcb1c1a248351befb406b485ef4b7bc Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sat, 25 Sep 2021 23:39:38 +0200 Subject: [PATCH 2/2] add doc --- app/Services/DavClient/Utils/AddressBookGetter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/DavClient/Utils/AddressBookGetter.php b/app/Services/DavClient/Utils/AddressBookGetter.php index 89ac5499b29..1f0e569ae08 100644 --- a/app/Services/DavClient/Utils/AddressBookGetter.php +++ b/app/Services/DavClient/Utils/AddressBookGetter.php @@ -109,6 +109,7 @@ private function getAddressBookBaseUri(): string * @return void * * @see https://datatracker.ietf.org/doc/html/rfc2518#section-15 + * @see https://datatracker.ietf.org/doc/html/rfc6352#section-6.1 * * @throws DavServerNotCompliantException */