commit 274626ab5e86d75cd7bf5efb570ff575b0ccf4ba
parent 4a9538593c6110b5972d802aebf1c4990edafe38
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Nov 2022 13:17:12 +0100
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.43 to 7.0.44 (#1107)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.43 to 7.0.44.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.43...v7.0.44)
---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat:
8 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/go.mod b/go.mod
@@ -31,7 +31,7 @@ require (
github.com/jackc/pgx/v4 v4.17.2
github.com/microcosm-cc/bluemonday v1.0.21
github.com/miekg/dns v1.1.50
- github.com/minio/minio-go/v7 v7.0.43
+ github.com/minio/minio-go/v7 v7.0.44
github.com/mitchellh/mapstructure v1.5.0
github.com/oklog/ulid v1.3.1
github.com/robfig/cron/v3 v3.0.1
diff --git a/go.sum b/go.sum
@@ -466,8 +466,8 @@ github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=
github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
-github.com/minio/minio-go/v7 v7.0.43 h1:14Q4lwblqTdlAmba05oq5xL0VBLHi06zS4yLnIkz6hI=
-github.com/minio/minio-go/v7 v7.0.43/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw=
+github.com/minio/minio-go/v7 v7.0.44 h1:9zUJ7iU7ax2P1jOvTp6nVrgzlZq3AZlFm0XfRFDKstM=
+github.com/minio/minio-go/v7 v7.0.44/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw=
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
diff --git a/vendor/github.com/minio/minio-go/v7/api.go b/vendor/github.com/minio/minio-go/v7/api.go
@@ -119,7 +119,7 @@ type Options struct {
// Global constants.
const (
libraryName = "minio-go"
- libraryVersion = "v7.0.43"
+ libraryVersion = "v7.0.44"
)
// User Agent should always following the below style.
diff --git a/vendor/github.com/minio/minio-go/v7/functional_tests.go b/vendor/github.com/minio/minio-go/v7/functional_tests.go
@@ -4204,10 +4204,6 @@ func testPresignedPostPolicy() {
logError(testName, function, args, startTime, "", "SetKey did not fail for invalid conditions", err)
return
}
- if err := policy.SetKeyStartsWith(""); err == nil {
- logError(testName, function, args, startTime, "", "SetKeyStartsWith did not fail for invalid conditions", err)
- return
- }
if err := policy.SetExpires(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)); err == nil {
logError(testName, function, args, startTime, "", "SetExpires did not fail for invalid conditions", err)
return
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/notification/notification.go b/vendor/github.com/minio/minio-go/v7/pkg/notification/notification.go
@@ -21,6 +21,7 @@ import (
"encoding/xml"
"errors"
"fmt"
+ "strings"
"github.com/minio/minio-go/v7/pkg/set"
)
@@ -88,6 +89,27 @@ func NewArn(partition, service, region, accountID, resource string) Arn {
}
}
+var (
+ // ErrInvalidArnPrefix is returned when ARN string format does not start with 'arn'
+ ErrInvalidArnPrefix = errors.New("invalid ARN format, must start with 'arn:'")
+ // ErrInvalidArnFormat is returned when ARN string format is not valid
+ ErrInvalidArnFormat = errors.New("invalid ARN format, must be 'arn:<partition>:<service>:<region>:<accountID>:<resource>'")
+)
+
+// NewArnFromString parses string representation of ARN into Arn object.
+// Returns an error if the string format is incorrect.
+func NewArnFromString(arn string) (Arn, error) {
+ parts := strings.Split(arn, ":")
+ if len(parts) != 6 {
+ return Arn{}, ErrInvalidArnFormat
+ }
+ if parts[0] != "arn" {
+ return Arn{}, ErrInvalidArnPrefix
+ }
+
+ return NewArn(parts[1], parts[2], parts[3], parts[4], parts[5]), nil
+}
+
// String returns the string format of the ARN
func (arn Arn) String() string {
return "arn:" + arn.Partition + ":" + arn.Service + ":" + arn.Region + ":" + arn.AccountID + ":" + arn.Resource
diff --git a/vendor/github.com/minio/minio-go/v7/post-policy.go b/vendor/github.com/minio/minio-go/v7/post-policy.go
@@ -97,10 +97,8 @@ func (p *PostPolicy) SetKey(key string) error {
// SetKeyStartsWith - Sets an object name that an policy based upload
// can start with.
+// Can use an empty value ("") to allow any key.
func (p *PostPolicy) SetKeyStartsWith(keyStartsWith string) error {
- if strings.TrimSpace(keyStartsWith) == "" || keyStartsWith == "" {
- return errInvalidArgument("Object prefix is empty.")
- }
policyCond := policyCondition{
matchType: "starts-with",
condition: "$key",
@@ -171,7 +169,7 @@ func (p *PostPolicy) SetContentType(contentType string) error {
// SetContentTypeStartsWith - Sets what content-type of the object for this policy
// based upload can start with.
-// If "" is provided it allows all content-types.
+// Can use an empty value ("") to allow any content-type.
func (p *PostPolicy) SetContentTypeStartsWith(contentTypeStartsWith string) error {
policyCond := policyCondition{
matchType: "starts-with",
@@ -283,10 +281,14 @@ func (p *PostPolicy) SetUserData(key string, value string) error {
}
// addNewPolicy - internal helper to validate adding new policies.
+// Can use starts-with with an empty value ("") to allow any content within a form field.
func (p *PostPolicy) addNewPolicy(policyCond policyCondition) error {
- if policyCond.matchType == "" || policyCond.condition == "" || policyCond.value == "" {
+ if policyCond.matchType == "" || policyCond.condition == "" {
return errInvalidArgument("Policy fields are empty.")
}
+ if policyCond.matchType != "starts-with" && policyCond.value == "" {
+ return errInvalidArgument("Policy value is empty.")
+ }
p.conditions = append(p.conditions, policyCond)
return nil
}
diff --git a/vendor/github.com/minio/minio-go/v7/s3-endpoints.go b/vendor/github.com/minio/minio-go/v7/s3-endpoints.go
@@ -28,8 +28,10 @@ var awsS3EndpointMap = map[string]string{
"eu-west-2": "s3.dualstack.eu-west-2.amazonaws.com",
"eu-west-3": "s3.dualstack.eu-west-3.amazonaws.com",
"eu-central-1": "s3.dualstack.eu-central-1.amazonaws.com",
+ "eu-central-2": "s3.dualstack.eu-central-2.amazonaws.com",
"eu-north-1": "s3.dualstack.eu-north-1.amazonaws.com",
"eu-south-1": "s3.dualstack.eu-south-1.amazonaws.com",
+ "eu-south-2": "s3.dualstack.eu-south-2.amazonaws.com",
"ap-east-1": "s3.dualstack.ap-east-1.amazonaws.com",
"ap-south-1": "s3.dualstack.ap-south-1.amazonaws.com",
"ap-southeast-1": "s3.dualstack.ap-southeast-1.amazonaws.com",
@@ -38,6 +40,7 @@ var awsS3EndpointMap = map[string]string{
"ap-northeast-2": "s3.dualstack.ap-northeast-2.amazonaws.com",
"ap-northeast-3": "s3.dualstack.ap-northeast-3.amazonaws.com",
"af-south-1": "s3.dualstack.af-south-1.amazonaws.com",
+ "me-central-1": "s3.dualstack.me-central-1.amazonaws.com",
"me-south-1": "s3.dualstack.me-south-1.amazonaws.com",
"sa-east-1": "s3.dualstack.sa-east-1.amazonaws.com",
"us-gov-west-1": "s3.dualstack.us-gov-west-1.amazonaws.com",
diff --git a/vendor/modules.txt b/vendor/modules.txt
@@ -284,7 +284,7 @@ github.com/miekg/dns
# github.com/minio/md5-simd v1.1.2
## explicit; go 1.14
github.com/minio/md5-simd
-# github.com/minio/minio-go/v7 v7.0.43
+# github.com/minio/minio-go/v7 v7.0.44
## explicit; go 1.17
github.com/minio/minio-go/v7
github.com/minio/minio-go/v7/pkg/credentials