mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
Verify if request date is 5minutes late, reject such a request as
it could be a possible replay attack. This commit also fixes #505, by returning MethodNotAllowed instead of NotImplemented
This commit is contained in:
@@ -123,6 +123,7 @@ func setAuthHeader(req *http.Request) {
|
||||
encoder.Write(hm.Sum(nil))
|
||||
encoder.Close()
|
||||
req.Header.Set("Authorization", authHeader.String())
|
||||
req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
|
||||
}
|
||||
|
||||
func (s *MySuite) TestNonExistantBucket(c *C) {
|
||||
|
||||
Reference in New Issue
Block a user