From 2da0cfc9049babe0e43e0e6f55ab3528f8d9c629 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 22 Aug 2016 19:43:36 -0700 Subject: [PATCH] signature: Use the client sent region if region is properly validated. (#2534) A properly validated region string from the client should be once validated properly. Fixes #2521 --- cmd/signature-v4.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/signature-v4.go b/cmd/signature-v4.go index e0b051f17..2a91e70c2 100644 --- a/cmd/signature-v4.go +++ b/cmd/signature-v4.go @@ -361,9 +361,8 @@ func doesSignatureMatch(hashedPayload string, r *http.Request, validateRegion bo if !isValidRegion(sRegion, region) { return ErrInvalidRegion } - } else { - region = sRegion } + region = sRegion // Extract date, if not present throw error. var date string