Skip to content

Commit

Permalink
Merge pull request #50 from HPInc/fix/decode-url-path
Browse files Browse the repository at this point in the history
Fix: decode url path before sign
  • Loading branch information
juanjoseruiz authored Sep 4, 2023
2 parents fd7dd02 + d9f092d commit cbd5a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OneflowSDK.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ protected function post_file_s3($uploadUrl, $localPath) {
* @return string
*/
private function token($method, $path, $timestamp){
$stringToSign = strtoupper($method) . ' ' . $path . ' ' . $timestamp;
$stringToSign = strtoupper($method) . ' ' . urldecode($path) . ' ' . $timestamp;
return $this->key . ':' . hash_hmac('sha256', $stringToSign, $this->secret);
}

Expand Down

0 comments on commit cbd5a0e

Please sign in to comment.