From a26532f60ffc2538fcc8e527dfe149ff995cd371 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 30 Jun 2026 09:18:40 +0600 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20POP=20=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=20percentEncode=20=E4=BD=BF=E7=94=A8=20Unicode=20?= =?UTF-8?q?=E5=AD=97=E6=AF=8D=E9=9B=86=E5=AF=BC=E8=87=B4=E9=9D=9E=20ASCII?= =?UTF-8?q?=20=E5=AD=97=E7=AC=A6=E6=9C=AA=E7=BC=96=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CharacterSet.alphanumerics 包含所有 Unicode 字母(阿拉伯文等),导致搜索含非 ASCII 关键词时签名不匹配。改为仅允许 ASCII 字母数字加 -_.~ --- .../VODManager/Sources/VODManager/Services/VODSignature.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/macos/VODManager/Sources/VODManager/Services/VODSignature.swift b/apps/macos/VODManager/Sources/VODManager/Services/VODSignature.swift index 56df256..5692538 100644 --- a/apps/macos/VODManager/Sources/VODManager/Services/VODSignature.swift +++ b/apps/macos/VODManager/Sources/VODManager/Services/VODSignature.swift @@ -40,8 +40,7 @@ struct VODSignature { } private static func percentEncode(_ value: String) -> String { - var allowed = CharacterSet.alphanumerics - allowed.insert(charactersIn: "-_.~") + let allowed = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~") return value.addingPercentEncoding(withAllowedCharacters: allowed) ?? value } }