diff --git a/src/endpoint/s3/ops/s3_put_bucket_lifecycle.js b/src/endpoint/s3/ops/s3_put_bucket_lifecycle.js index b54024cc4f..66fc433d8e 100644 --- a/src/endpoint/s3/ops/s3_put_bucket_lifecycle.js +++ b/src/endpoint/s3/ops/s3_put_bucket_lifecycle.js @@ -97,6 +97,11 @@ async function put_bucket_lifecycle(req) { if (rule.Status?.length !== 1) { dbg.error('Rule should have status', rule); throw new S3Error(S3Error.InvalidArgument); + } else if (rule.status?.length == 1) { + if (rule.Status[0] !== "Enabled" || rule.Status[0] !== "Disabled") { + dbg.error('Rule should not have status value: ', rule.Status[0]); + throw new S3Error({ ...S3Error.MalformedXML, message: 'The XML you provided was not well-formed or did not validate against our published schema'}); + } } current_rule.status = rule.Status[0];