mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03:00
Add Request Not Ready error when presigned date request is not valid (#2646)
This commit is contained in:
committed by
Harshavardhana
parent
32201a18ab
commit
11785529fc
@@ -246,6 +246,10 @@ func doesPresignedSignatureMatch(hashedPayload string, r *http.Request, validate
|
||||
|
||||
query.Set("X-Amz-Algorithm", signV4Algorithm)
|
||||
|
||||
if pSignValues.Date.After(time.Now().UTC()) {
|
||||
return ErrRequestNotReadyYet
|
||||
}
|
||||
|
||||
if time.Now().UTC().Sub(pSignValues.Date) > time.Duration(pSignValues.Expires) {
|
||||
return ErrExpiredPresignRequest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user