Skip to content

Commit 270b345

Browse files
committed
urlencode except slash
1 parent b94c674 commit 270b345

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Qiniu/Cdn/CdnManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public static function createTimestampAntiLeechUrl($rawUrl, $encryptKey, $durati
175175
$deadline = time() + $durationInSeconds;
176176
$expireHex = dechex($deadline);
177177
$path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '';
178+
$path = implode('/', array_map('rawurlencode', explode('/', $path)));
178179

179180
$strToSign = $encryptKey . $path . $expireHex;
180181
$signStr = md5($strToSign);

0 commit comments

Comments
 (0)