[#660] Fix panic on invalid versioning status

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-08-22 14:42:54 +03:00 committed by Alex Vanin
parent 24e1f7e1dd
commit f013282290

View file

@ -34,7 +34,7 @@ func (h *handler) PutBucketVersioningHandler(w http.ResponseWriter, r *http.Requ
}
if configuration.Status != data.VersioningEnabled && configuration.Status != data.VersioningSuspended {
h.logAndSendError(w, "invalid versioning configuration", reqInfo, err)
h.logAndSendError(w, "invalid versioning configuration", reqInfo, errors.GetAPIError(errors.ErrMalformedXML))
return
}
settings.Versioning = configuration.Status