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:
Harshavardhana
2015-04-27 03:54:49 -07:00
parent 1531802b73
commit ade803a923
5 changed files with 73 additions and 16 deletions
+1 -5
View File
@@ -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:
{