From 3add86ef9e815ca8dd6398a0a7fe222330cb1522 Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:20:05 +0800 Subject: [PATCH] [s3acl] Step 0: Put bucket ACL only responds success if the ACL is private. (#4856) * Passing test: test_bucket_acl_default test_bucket_acl_canned_private_to_private https://github.com/seaweedfs/seaweedfs/issues/4519 * Update weed/s3api/s3api_bucket_handlers.go --------- Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co> Co-authored-by: Chris Lu Signed-off-by: LHHDZ --- docker/compose/s3tests.conf | 4 ++-- weed/s3api/s3api_bucket_handlers.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/compose/s3tests.conf b/docker/compose/s3tests.conf index 68d9ddeb7..2bffe20d4 100644 --- a/docker/compose/s3tests.conf +++ b/docker/compose/s3tests.conf @@ -18,10 +18,10 @@ bucket prefix = yournamehere-{random}- [s3 main] # main display_name set in vstart.sh -display_name = M. Tester +display_name = s3_tests # main user_idname set in vstart.sh -user_id = testid +user_id = s3_tests # main email set in vstart.sh email = tester@ceph.com diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index 7f07c0f9d..1fd212d7f 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -424,6 +424,7 @@ func (s3a *S3ApiServer) PutBucketOwnershipControls(w http.ResponseWriter, r *htt defer util.CloseRequest(r) var v s3.OwnershipControls + err := xmlutil.UnmarshalXML(&v, xml.NewDecoder(r.Body), "") if err != nil { s3err.WriteErrorResponse(w, r, s3err.ErrInvalidRequest)