This commit adds a check to the server's admin-API such that it only
accepts Admin-API requests with authenticated bodies. Further this
commit updates the `madmin` package to always add the
`X-Amz-Content-Sha256` header.
This change improves the Admin-API security since the server does not
accept unauthenticated request bodies anymore.
After this commit `mc` must be updated to the new `madmin` api because
requests over TLS connections will fail.
master
Andreas Auernhammer7 years agocommitted bykannappanr
ifgetRequestAuthType(r)==authTypeSigned{// we only support V4 (no presign)
if_,ok:=r.Header["X-Amz-Content-Sha256"];ok&&getRequestAuthType(r)==authTypeSigned&&!skipContentSha256Cksum(r){// we only support V4 (no presign) with auth. body