From d5a5f2f29fc1c2b5f7dda0af5b984264744478b5 Mon Sep 17 00:00:00 2001 From: Jabasukuriputo Wang Date: Sun, 25 Jun 2023 01:31:02 +0800 Subject: [PATCH] Strip whitespaces from URL and dirname prior to extension installation This avoid some cryptic errors brought by accidental spaces around urls --- modules/ui_extensions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 515ec262..6e5222ba 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -325,6 +325,11 @@ def normalize_git_url(url): def install_extension_from_url(dirname, url, branch_name=None): check_access() + if isinstance(dirname, str): + dirname = dirname.strip() + if isinstance(url, str): + url = url.strip() + assert url, 'No URL specified' if dirname is None or dirname == "":