From 2f2190c6afce7b3590995830c64de2e4a8b3a7e0 Mon Sep 17 00:00:00 2001 From: sans Date: Sun, 19 Jul 2026 01:23:46 +0800 Subject: [PATCH] =?UTF-8?q?setup=20=E8=84=9A=E6=9C=AC=E9=87=8C=E7=9A=84=20?= =?UTF-8?q?URL=20=E5=8C=85=E5=90=AB=E4=B8=AD=E6=96=87=EF=BC=88=E4=B8=AD?= =?UTF-8?q?=E5=8D=8E=E6=97=8F=E8=B0=B1=EF=BC=89=EF=BC=8C=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E4=B8=8A=E7=9A=84=20curl=20=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=BC=96=E7=A0=81=E3=80=82=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=9C=A8=E5=90=8E=E7=AB=AF=E7=94=9F=E6=88=90=20URL=20=E6=97=B6?= =?UTF-8?q?=E5=B0=B1=E6=8A=8A=E4=B8=AD=E6=96=87=E7=BC=96=E7=A0=81=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routers/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/routers/admin.py b/backend/routers/admin.py index 4fa6f3e..75050ef 100644 --- a/backend/routers/admin.py +++ b/backend/routers/admin.py @@ -668,10 +668,11 @@ async def admin_setup_script( template_dir = Path(__file__).parent.parent / "templates_cert" jinja_env = Environment(loader=FileSystemLoader(str(template_dir))) + from urllib.parse import quote settings = get_settings() base_url = str(request.base_url).rstrip("/") ext = "ps1" if os == "windows" else "sh" - download_url = f"{base_url}/admin/api/script/download?domain={domain}&server_name={server_name}&os={os}" + download_url = f"{base_url}/admin/api/script/download?domain={quote(domain)}&server_name={quote(server_name)}&os={os}" template_name = "setup-cert.ps1.j2" if os == "windows" else "setup-cert.sh.j2" tpl = jinja_env.get_template(template_name)