From b77328f8112f18aeef3c7cd67d3f8929526f8555 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Fri, 13 Mar 2026 17:47:02 +0100 Subject: [PATCH] sharing: enforce trailing / --- radicale/sharing/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radicale/sharing/__init__.py b/radicale/sharing/__init__.py index 028637aa..d279df08 100644 --- a/radicale/sharing/__init__.py +++ b/radicale/sharing/__init__.py @@ -668,12 +668,12 @@ class BaseSharing: if not re.search('^' + TOKEN_PATTERN_V1 + '$', request_data[key]): logger.warning(api_info + ": unsupported " + key) return httputils.bad_request("Invalid value for PathOrToken") - elif ShareType == "map": + else: if not re.search('^' + PATH_PATTERN + '$', request_data[key]): logger.warning(api_info + ": unsupported " + key) return httputils.bad_request("Invalid value for PathOrToken") - elif not request_data[key].endswith("/"): - return httputils.bad_request("PathOrToken not ending with /") + if not request_data[key].endswith("/"): + return httputils.bad_request("PathOrToken not ending with /") elif key == "PathMapped": if not re.search('^' + PATH_PATTERN + '$', request_data[key]): logger.warning(api_info + ": unsupported " + key)