From 4b9ae2926f6201975329a8f3f0df84a25a8e7fe7 Mon Sep 17 00:00:00 2001 From: michaelnv Date: Wed, 25 Jul 2018 22:40:25 +0500 Subject: [PATCH] Fix issue with incorrectly processed signed payload in pre-signed URL --- src/Signature/S3SignatureV4.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Signature/S3SignatureV4.php b/src/Signature/S3SignatureV4.php index 1055ce79bb..cfd8ed2bd8 100644 --- a/src/Signature/S3SignatureV4.php +++ b/src/Signature/S3SignatureV4.php @@ -38,22 +38,13 @@ public function presign( if (!$request->hasHeader('x-amz-content-sha256')) { $request = $request->withHeader( 'X-Amz-Content-Sha256', - $this->getPresignedPayload($request) + SignatureV4::UNSIGNED_PAYLOAD ); } return parent::presign($request, $credentials, $expires, $options); } - /** - * Override used to allow pre-signed URLs to be created for an - * in-determinate request payload. - */ - protected function getPresignedPayload(RequestInterface $request) - { - return SignatureV4::UNSIGNED_PAYLOAD; - } - /** * Amazon S3 does not double-encode the path component in the canonical request */