diff options
Diffstat (limited to 'apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php')
-rw-r--r-- | apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php index 7587af0fcba..edbb4fcd082 100644 --- a/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php +++ b/apps/files_external/3rdparty/aws-sdk-php/Aws/S3/S3SignatureV4.php @@ -32,7 +32,10 @@ class S3SignatureV4 extends SignatureV4 implements S3SignatureInterface public function signRequest(RequestInterface $request, CredentialsInterface $credentials) { if (!$request->hasHeader('x-amz-content-sha256')) { - $request->setHeader('x-amz-content-sha256', $this->getPresignedPayload($request)); + $request->setHeader( + 'x-amz-content-sha256', + $this->getPayload($request) + ); } parent::signRequest($request, $credentials); @@ -44,14 +47,7 @@ class S3SignatureV4 extends SignatureV4 implements S3SignatureInterface */ protected function getPresignedPayload(RequestInterface $request) { - $result = parent::getPresignedPayload($request); - - // If the body is empty, then sign with 'UNSIGNED-PAYLOAD' - if ($result === self::DEFAULT_PAYLOAD) { - $result = hash('sha256', 'UNSIGNED-PAYLOAD'); - } - - return $result; + return 'UNSIGNED-PAYLOAD'; } /** |