From 5920fe1efe1a96aa97d2f9c507af6bf18d42dda8 Mon Sep 17 00:00:00 2001 From: Nick v H Date: Mon, 20 Sep 2021 19:04:42 +0000 Subject: [PATCH] Enclose XML response to only contain the XML tags (trimming any possible trailing characters after the last XML tag) --- inc/caldav-client.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-client.php b/inc/caldav-client.php index b32c5c91..62b2a747 100644 --- a/inc/caldav-client.php +++ b/inc/caldav-client.php @@ -119,12 +119,13 @@ class CalDAVClient { */ function ParseResponse( $response ) { $pos = strpos($response, ''); if ($pos === false) { $this->httpResponse = trim($response); } else { $this->httpResponse = trim(substr($response, 0, $pos)); - $this->xmlResponse = trim(substr($response, $pos)); + $this->xmlResponse = trim(substr($response, $pos, $epos-$pos+1)); } }