summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-06-24 08:07:15 +0000
committerLibravatar GitHub <noreply@github.com>2024-06-24 08:07:15 +0000
commitb9864e83a01bef962eef843cd441a162b937b4b0 (patch)
tree75f451990dbeb9f07e2e48f25e25de88bb6493df
parent[chore]: Bump github.com/yuin/goldmark from 1.7.2 to 1.7.3 (#3034) (diff)
downloadgotosocial-b9864e83a01bef962eef843cd441a162b937b4b0.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.71 to 7.0.72 (#3037)
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-compose-object.go2
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-put-object.go16
-rw-r--r--vendor/github.com/minio/minio-go/v7/api.go2
-rw-r--r--vendor/github.com/minio/minio-go/v7/utils.go16
-rw-r--r--vendor/modules.txt2
7 files changed, 21 insertions, 23 deletions
diff --git a/go.mod b/go.mod
index e7ec4de3e..a3dae9f74 100644
--- a/go.mod
+++ b/go.mod
@@ -43,7 +43,7 @@ require (
github.com/jackc/pgx/v5 v5.6.0
github.com/microcosm-cc/bluemonday v1.0.26
github.com/miekg/dns v1.1.61
- github.com/minio/minio-go/v7 v7.0.71
+ github.com/minio/minio-go/v7 v7.0.72
github.com/mitchellh/mapstructure v1.5.0
github.com/ncruces/go-sqlite3 v0.16.3
github.com/oklog/ulid v1.3.1
diff --git a/go.sum b/go.sum
index 02cd52c1d..be83ced7b 100644
--- a/go.sum
+++ b/go.sum
@@ -422,8 +422,8 @@ github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs=
github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ=
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.71 h1:No9XfOKTYi6i0GnBj+WZwD8WP5GZfL7n7GOjRqCdAjA=
-github.com/minio/minio-go/v7 v7.0.71/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo=
+github.com/minio/minio-go/v7 v7.0.72 h1:ZSbxs2BfJensLyHdVOgHv+pfmvxYraaUy07ER04dWnA=
+github.com/minio/minio-go/v7 v7.0.72/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
diff --git a/vendor/github.com/minio/minio-go/v7/api-compose-object.go b/vendor/github.com/minio/minio-go/v7/api-compose-object.go
index 8c12c355c..bb595626e 100644
--- a/vendor/github.com/minio/minio-go/v7/api-compose-object.go
+++ b/vendor/github.com/minio/minio-go/v7/api-compose-object.go
@@ -119,7 +119,7 @@ func (opts CopyDestOptions) Marshal(header http.Header) {
if opts.ReplaceMetadata {
header.Set("x-amz-metadata-directive", replaceDirective)
for k, v := range filterCustomMeta(opts.UserMetadata) {
- if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isValidReplicationEncryptionHeader(k) {
+ if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isMinioHeader(k) {
header.Set(k, v)
} else {
header.Set("x-amz-meta-"+k, v)
diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object.go b/vendor/github.com/minio/minio-go/v7/api-put-object.go
index 4dec6040d..a96de9b9f 100644
--- a/vendor/github.com/minio/minio-go/v7/api-put-object.go
+++ b/vendor/github.com/minio/minio-go/v7/api-put-object.go
@@ -106,7 +106,11 @@ func (opts *PutObjectOptions) SetMatchETag(etag string) {
if opts.customHeaders == nil {
opts.customHeaders = http.Header{}
}
- opts.customHeaders.Set("If-Match", "\""+etag+"\"")
+ if etag == "*" {
+ opts.customHeaders.Set("If-Match", "*")
+ } else {
+ opts.customHeaders.Set("If-Match", "\""+etag+"\"")
+ }
}
// SetMatchETagExcept if etag does not match while PUT MinIO returns an
@@ -116,7 +120,11 @@ func (opts *PutObjectOptions) SetMatchETagExcept(etag string) {
if opts.customHeaders == nil {
opts.customHeaders = http.Header{}
}
- opts.customHeaders.Set("If-None-Match", "\""+etag+"\"")
+ if etag == "*" {
+ opts.customHeaders.Set("If-None-Match", "*")
+ } else {
+ opts.customHeaders.Set("If-None-Match", "\""+etag+"\"")
+ }
}
// getNumThreads - gets the number of threads to be used in the multipart
@@ -212,7 +220,7 @@ func (opts PutObjectOptions) Header() (header http.Header) {
}
for k, v := range opts.UserMetadata {
- if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isValidReplicationEncryptionHeader(k) {
+ if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isMinioHeader(k) {
header.Set(k, v)
} else {
header.Set("x-amz-meta-"+k, v)
@@ -230,7 +238,7 @@ func (opts PutObjectOptions) Header() (header http.Header) {
// validate() checks if the UserMetadata map has standard headers or and raises an error if so.
func (opts PutObjectOptions) validate() (err error) {
for k, v := range opts.UserMetadata {
- if !httpguts.ValidHeaderFieldName(k) || isStandardHeader(k) || isSSEHeader(k) || isStorageClassHeader(k) || isValidReplicationEncryptionHeader(k) {
+ if !httpguts.ValidHeaderFieldName(k) || isStandardHeader(k) || isSSEHeader(k) || isStorageClassHeader(k) || isMinioHeader(k) {
return errInvalidArgument(k + " unsupported user defined metadata name")
}
if !httpguts.ValidHeaderFieldValue(v) {
diff --git a/vendor/github.com/minio/minio-go/v7/api.go b/vendor/github.com/minio/minio-go/v7/api.go
index ca76d4287..eaaaa68c2 100644
--- a/vendor/github.com/minio/minio-go/v7/api.go
+++ b/vendor/github.com/minio/minio-go/v7/api.go
@@ -129,7 +129,7 @@ type Options struct {
// Global constants.
const (
libraryName = "minio-go"
- libraryVersion = "v7.0.71"
+ libraryVersion = "v7.0.72"
)
// User Agent should always following the below style.
diff --git a/vendor/github.com/minio/minio-go/v7/utils.go b/vendor/github.com/minio/minio-go/v7/utils.go
index 252f45223..a5beb371f 100644
--- a/vendor/github.com/minio/minio-go/v7/utils.go
+++ b/vendor/github.com/minio/minio-go/v7/utils.go
@@ -510,19 +510,9 @@ func isAmzHeader(headerKey string) bool {
return strings.HasPrefix(key, "x-amz-meta-") || strings.HasPrefix(key, "x-amz-grant-") || key == "x-amz-acl" || isSSEHeader(headerKey) || strings.HasPrefix(key, "x-amz-checksum-")
}
-var supportedReplicationEncryptionHeaders = map[string]bool{
- "x-minio-replication-server-side-encryption-sealed-key": true,
- "x-minio-replication-server-side-encryption-seal-algorithm": true,
- "x-minio-replication-server-side-encryption-iv": true,
- "x-minio-replication-encrypted-multipart": true,
- "x-minio-replication-actual-object-size": true,
- // Add more supported headers here.
- // Must be lower case.
-}
-
-// isValidReplicationEncryptionHeader returns true if header is one of valid replication encryption headers
-func isValidReplicationEncryptionHeader(headerKey string) bool {
- return supportedReplicationEncryptionHeaders[strings.ToLower(headerKey)]
+// isMinioHeader returns true if header is x-minio- header.
+func isMinioHeader(headerKey string) bool {
+ return strings.HasPrefix(strings.ToLower(headerKey), "x-minio-")
}
// supportedQueryValues is a list of query strings that can be passed in when using GetObject.
diff --git a/vendor/modules.txt b/vendor/modules.txt
index ec3e97e0d..e3f7cb4c0 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -488,7 +488,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.71
+# github.com/minio/minio-go/v7 v7.0.72
## explicit; go 1.21
github.com/minio/minio-go/v7
github.com/minio/minio-go/v7/pkg/credentials