fix: return default bucket acl if none exists

We were trying to parse a non existing acl and returning an
internal server error due to invalid json acl data.

If the bucket acl does not exist, return a default acl with the
root account as the owner.

This fixes #1060, but does not address the invalid acl format
from s3cmd reported in #963.
This commit is contained in:
Ben McClelland
2025-02-12 16:38:04 -08:00
parent 2d75bae2ec
commit a3338dbd34
5 changed files with 23 additions and 4 deletions
+1 -1
View File
@@ -921,7 +921,7 @@ func (c S3ApiController) ListActions(ctx *fiber.Ctx) error {
})
}
res, err := auth.ParseACLOutput(data)
res, err := auth.ParseACLOutput(data, parsedAcl.Owner)
return SendXMLResponse(ctx, res, err,
&MetaOpts{
Logger: c.logger,