From a4ac1fa044a17346f7b00989ba1aedee3d85f55a Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Tue, 15 Aug 2023 08:09:25 -0700 Subject: [PATCH] update util.base_url to handle python 3.9.17 change to urllib.parse.urlsplit https://docs.python.org/release/3.9.17/whatsnew/changelog.html#changelog > gh-102153: urllib.parse.urlsplit() now strips leading C0 control and space characters following the specification for URLs defined by WHATWG in response to CVE-2023-24329. Patch by Illia Volochii. https://github.com/python/cpython/issues/102153 --- util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.py b/util.py index dd884cd..7f0cd14 100644 --- a/util.py +++ b/util.py @@ -586,7 +586,7 @@ def base_url(url): Args: url: string """ - return urllib.parse.urljoin(url, ' ')[:-1] if url else None + return urllib.parse.urljoin(url, 'x')[:-1] if url else None def is_web(url):