From e8c3bdb4825a53d82ffe6339af6f2af2524b84e6 Mon Sep 17 00:00:00 2001 From: Tyler Levy Conde Date: Mon, 8 Apr 2024 13:01:54 -0600 Subject: [PATCH] set allow_fragments to False --- salt/fileclient.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/salt/fileclient.py b/salt/fileclient.py index 90b5ee47cc9..32c5cd0d948 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -481,11 +481,9 @@ class Client: """ Get a single file from a URL. """ - url = urllib.parse.quote(url, safe=":/") - url_data = urllib.parse.urlparse(url) + url_data = urllib.parse.urlparse(url, allow_fragments=False) url_scheme = url_data.scheme url_path = os.path.join(url_data.netloc, url_data.path).rstrip(os.sep) - url_path = urllib.parse.unquote(url_path) # If dest is a directory, rewrite dest with filename if dest is not None and (os.path.isdir(dest) or dest.endswith(("/", "\\"))):