From d21d0ea99b2cf08b2b634efd62c718c22b334b65 Mon Sep 17 00:00:00 2001 From: orenzhang Date: Mon, 2 Dec 2024 18:50:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(cos):=20=E5=B8=A6=E6=9C=89=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E7=9A=84URL=E7=AD=BE=E5=90=8D=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/filesystem/driver/cos/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/filesystem/driver/cos/handler.go b/pkg/filesystem/driver/cos/handler.go index 63e5c4a4..906bdf61 100644 --- a/pkg/filesystem/driver/cos/handler.go +++ b/pkg/filesystem/driver/cos/handler.go @@ -360,7 +360,7 @@ func signCDNURL(rawUrl string) (string, error) { } nonce := strings.Replace(random.String(), "-", "", 4) uid := "0" - signatureString := fmt.Sprintf("%s-%d-%s-%s-%s", parsedUrl.Path, timestamp, nonce, uid, cdnSignKey) + signatureString := fmt.Sprintf("%s-%d-%s-%s-%s", parsedUrl.EscapedPath(), timestamp, nonce, uid, cdnSignKey) hash := md5.Sum([]byte(signatureString)) signature := hex.EncodeToString(hash[:])