From 18f74101f9b81232e6529dd064243f38c9ed2ace Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 11 Sep 2026 12:41:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(attachments):=20ticket=5Fattachment.dspy?= =?UTF-8?q?=E7=9A=84safe=5Fname=E5=8F=AA=E5=9C=A8download=E5=88=86?= =?UTF-8?q?=E6=94=AF=E5=AE=9A=E4=B9=89,inline=E6=89=93=E5=BC=80=E8=B7=AF?= =?UTF-8?q?=E5=BE=84500=E2=80=94=E2=80=94=E6=8F=90=E5=88=B0=E5=88=86?= =?UTF-8?q?=E6=94=AF=E5=A4=96=E7=BB=9F=E4=B8=80=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/ticket_attachment.dspy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wwwroot/api/ticket_attachment.dspy b/wwwroot/api/ticket_attachment.dspy index 6644628..4c0606a 100644 --- a/wwwroot/api/ticket_attachment.dspy +++ b/wwwroot/api/ticket_attachment.dspy @@ -19,9 +19,10 @@ if not ok: return {"widgettype": "Message", "options": {"title": "打开失败", "message": msg}} full_path, fname = res +fname = str(fname) +safe_name = _quote(fname) headers = {} if download: - safe_name = _quote(str(fname)) headers['Content-Disposition'] = ( 'attachment; filename="%s"; filename*=UTF-8\'\'%s' % (fname, safe_name)) else: