From e5ecdf5356a17fad8cc3e2bfa491820531bdf5c3 Mon Sep 17 00:00:00 2001 From: "Sebastian J. Bronner" Date: Thu, 31 Oct 2024 23:53:21 +0100 Subject: [PATCH] Avoid unquoting quoted slashes in an href --- vdirsyncer/storage/dav.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index 697ebf05..34f6640c 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -53,11 +53,7 @@ def _normalize_href(base, href): x = urlparse.urljoin(base, href) x = urlparse.urlsplit(x).path - - # We unquote and quote again, but want to make sure we - # keep around the "@" character. - x = urlparse.unquote(x) - x = urlparse.quote(x, "/@") + x = urlparse.quote(x, "%/@") if orig_href == x: dav_logger.debug(f"Already normalized: {x!r}")