mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 08:13:28 +03:00
api: xmlDecoder should honor contentLength. (#2226)
This is needed so that we avoid reading large amounts of data from compromised clients.
This commit is contained in:
+3
-4
@@ -322,10 +322,9 @@ func (api objectAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Req
|
||||
}
|
||||
}
|
||||
|
||||
// the location value in the request body should match the Region in serverConfig.
|
||||
// other values of location are not accepted.
|
||||
// make bucket fails in such cases.
|
||||
errCode := isValidLocationContraint(r.Body, serverConfig.GetRegion())
|
||||
// Validate if incoming location constraint is valid, reject
|
||||
// requests which do not follow valid region requirements.
|
||||
errCode := isValidLocationConstraint(r)
|
||||
if errCode != ErrNone {
|
||||
writeErrorResponse(w, r, errCode, r.URL.Path)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user