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
This commit is contained in:
Harshavardhana 2016-08-22 19:43:36 -07:00 committed by GitHub
parent 9dd0e3dc44
commit 2da0cfc904

View File

@ -361,9 +361,8 @@ func doesSignatureMatch(hashedPayload string, r *http.Request, validateRegion bo
if !isValidRegion(sRegion, region) { if !isValidRegion(sRegion, region) {
return ErrInvalidRegion return ErrInvalidRegion
} }
} else {
region = sRegion
} }
region = sRegion
// Extract date, if not present throw error. // Extract date, if not present throw error.
var date string var date string