Skip to content

Commit cbd5a0e

Browse files
authored
Merge pull request #50 from HPInc/fix/decode-url-path
Fix: decode url path before sign
2 parents fd7dd02 + d9f092d commit cbd5a0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OneflowSDK.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ protected function post_file_s3($uploadUrl, $localPath) {
431431
* @return string
432432
*/
433433
private function token($method, $path, $timestamp){
434-
$stringToSign = strtoupper($method) . ' ' . $path . ' ' . $timestamp;
434+
$stringToSign = strtoupper($method) . ' ' . urldecode($path) . ' ' . $timestamp;
435435
return $this->key . ':' . hash_hmac('sha256', $stringToSign, $this->secret);
436436
}
437437

0 commit comments

Comments
 (0)