From dc2317426dd7f58ae465e3b76498e32c711b095e Mon Sep 17 00:00:00 2001 From: Frank Rochlitzer Date: Wed, 30 Sep 2026 18:03:58 +0200 Subject: [PATCH] Fix(calendar): nextcloud/calendar/issues/70 parse_url() does not decode percent-encoded characters, so special characters (e.g. '#', '@', ':') in the credentials must be decoded before use, or Basic Auth sends the raw percent-encoded sequence instead of the real password. Signed-off-by: Frank Rochlitzer --- apps/dav/lib/CalDAV/WebcalCaching/Connection.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Connection.php b/apps/dav/lib/CalDAV/WebcalCaching/Connection.php index 1728b9c211483..b6b9eda5ff455 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/Connection.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/Connection.php @@ -62,7 +62,13 @@ public function queryWebcalFeed(array $subscription): ?array { $user = parse_url($subscription['source'], PHP_URL_USER); $pass = parse_url($subscription['source'], PHP_URL_PASS); if ($user !== null && $pass !== null) { - $params[RequestOptions::AUTH] = [$user, $pass]; + /* + * parse_url() does not decode percent-encoded characters, so + * special characters (e.g. '#', '@', ':') in the credentials + * must be decoded before use, or Basic Auth sends the raw + * percent-encoded sequence instead of the real password. + */ + $params[RequestOptions::AUTH] = [urldecode($user), urldecode($pass)]; } try {