mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 14:10:25 +03:00
Presign-v4: Allow requests that were signed slightly ahead of the current time. (#3435)
This commit is contained in:
committed by
Harshavardhana
parent
2062add05f
commit
8e665105b1
+3
-1
@@ -250,7 +250,9 @@ func doesPresignedSignatureMatch(hashedPayload string, r *http.Request, region s
|
|||||||
|
|
||||||
query.Set("X-Amz-Algorithm", signV4Algorithm)
|
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
|
return ErrRequestNotReadyYet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user