From d9a061a6bc1433f9fda225517c7171f7738b605f Mon Sep 17 00:00:00 2001 From: Peanut Date: Sun, 19 Jul 2026 13:27:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20=E4=BD=BF=E7=94=A8=20shlex.quote?= =?UTF-8?q?=20=E9=98=B2=E6=AD=A2=20curl=20URL=20=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E6=B3=A8=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy.py b/deploy.py index 1995a25..617a8be 100644 --- a/deploy.py +++ b/deploy.py @@ -23,6 +23,7 @@ Purpose: 统一部署所有服务到生产服务器,替代原有的多个 shel import io import os import re +import shlex import sys import time import subprocess @@ -525,8 +526,9 @@ def verify_deploy(): for url, label in endpoints: null_device = 'NUL' if sys.platform == 'win32' else '/dev/null' + safe_url = shlex.quote(url) ok, stdout, _ = run_command( - f'curl -k -s -o {null_device} -w "HTTP %{{http_code}}" {url}', + f'curl -k -s -o {null_device} -w "HTTP %{{http_code}}" {safe_url}', timeout=30 ) if ok and stdout: