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:
@@ -163,11 +163,7 @@ func (server *minioAPI) putObjectHandler(w http.ResponseWriter, req *http.Reques
|
||||
w.WriteHeader(http.StatusOK)
|
||||
case drivers.ObjectExists:
|
||||
{
|
||||
// we need to debate about this, if this is the right message to send back
|
||||
// https://github.com/minio-io/minio/issues/505
|
||||
|
||||
// Ideally we can use 405 Method No Allowed
|
||||
writeErrorResponse(w, req, NotImplemented, acceptsContentType, req.URL.Path)
|
||||
writeErrorResponse(w, req, MethodNotAllowed, acceptsContentType, req.URL.Path)
|
||||
}
|
||||
case drivers.BadDigest:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user