Upstream versity/versitygw state of the touched files before 91e4790870
This commit is contained in:
1 parent
d5ed12db2b
commit
efecf29ac0
6 files changed
+14
-124
No files matched your search
@@ -658,19 +658,18 @@ func (c S3ApiController) CreateBucket(ctx fiber.Ctx) (*Response, error) {
|
||||
},
|
||||
}, s3err.GetAPIError(s3err.ErrMalformedXML)
|
||||
}
|
||||
}
|
||||
|
||||
region, ok := utils.ContextKeyRegion.Get(ctx).(string)
|
||||
if !ok {
|
||||
region = defaultRegion
|
||||
}
|
||||
|
||||
if err := utils.ValidateLocationConstraint(body.LocationConstraint, region); err != nil {
|
||||
return &Response{
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: bucketOwner.Access,
|
||||
},
|
||||
}, err
|
||||
if body.LocationConstraint != nil {
|
||||
region := utils.ContextKeyRegion.Get(ctx).(string)
|
||||
if *body.LocationConstraint != region || *body.LocationConstraint == "us-east-1" {
|
||||
debuglogger.Logf("invalid location constraint: %s", *body.LocationConstraint)
|
||||
return &Response{
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: bucketOwner.Access,
|
||||
},
|
||||
}, s3err.GetInvalidLocationConstraintErr(*body.LocationConstraint)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defACL := auth.ACL{
|
||||
|
||||
Reference in new issue
Block a user