Presign-v4: Allow requests that were signed slightly ahead of the current time. (#3435)

master
Krishna Srinivas 8 years ago committed by Harshavardhana
parent 2062add05f
commit 8e665105b1
  1. 4
      cmd/signature-v4.go

@ -250,7 +250,9 @@ func doesPresignedSignatureMatch(hashedPayload string, r *http.Request, region s
query.Set("X-Amz-Algorithm", signV4Algorithm)
if pSignValues.Date.After(time.Now().UTC()) {
// If the host which signed the request is slightly ahead in time (by less than globalMaxSkewTime) the
// request should still be allowed.
if pSignValues.Date.After(time.Now().UTC().Add(globalMaxSkewTime)) {
return ErrRequestNotReadyYet
}

Loading…
Cancel
Save