From d2da635affb615a8687d24ad949b102a218c0762 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 24 Jan 2024 19:26:14 -0500 Subject: [PATCH] remove leading/trailing whitespace from hrefs This was found in the CALDAV 'calendar-multiget' REPORT and has been fixed --- webcit-ng/server/caldav_reports.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webcit-ng/server/caldav_reports.c b/webcit-ng/server/caldav_reports.c index edd0b4558..1031a4685 100644 --- a/webcit-ng/server/caldav_reports.c +++ b/webcit-ng/server/caldav_reports.c @@ -256,6 +256,7 @@ void caldav_report(struct http_transaction *h, struct ctdlsession *c) { StrBuf *ThisHref = NewStrBuf(); const char *pvset = NULL; while (StrBufExtract_NextToken(ThisHref, crp.Hrefs, &pvset, '|') >= 0) { + StrBufTrim(ThisHref); // remove leading/trailing whitespace from the href caldav_response(h, c, ReportOut, ThisHref); } FreeStrBuf(&ThisHref); @@ -263,7 +264,7 @@ void caldav_report(struct http_transaction *h, struct ctdlsession *c) { crp.Hrefs = NULL; } - StrBufAppendPrintf(ReportOut, "\n"); // End the REPORT. + StrBufAppendPrintf(ReportOut, "\n"); // End the REPORT. add_response_header(h, strdup("Content-type"), strdup("text/xml")); h->response_code = 207; -- 2.30.2