aws-sdk-s3 1.120.0 → 1.120.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +13 -11
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bde370899f8f2845bc0e53a0a4abf88ee9468d03d0b3efeb8afce96243aef15
|
4
|
+
data.tar.gz: 12ca1d59946062e1b37145bbaad04c3f506558b347705f0327778b9f70b0b9e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f0506278dc432adeb3210f474bb9d68d70451cb2755a2a1fffeef77e7b33053e22f9fececc0ab834212a9c3e3dd258384cddc66e897d2c36313c31e766202b4
|
7
|
+
data.tar.gz: 5258d9bf820de55517990fe9854a9d78be3712b91b58827b4f1c78a0fc2c785209aaa011d4cb2fed22e357d01380c19414b7bbb0026cf7e3bb3956c80df6020a
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.120.
|
1
|
+
1.120.1
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -15436,7 +15436,7 @@ module Aws::S3
|
|
15436
15436
|
params: params,
|
15437
15437
|
config: config)
|
15438
15438
|
context[:gem_name] = 'aws-sdk-s3'
|
15439
|
-
context[:gem_version] = '1.120.
|
15439
|
+
context[:gem_version] = '1.120.1'
|
15440
15440
|
Seahorse::Client::Request.new(handlers, context)
|
15441
15441
|
end
|
15442
15442
|
|
@@ -52,7 +52,9 @@ module Aws
|
|
52
52
|
|
53
53
|
def check_for_cached_region(context, bucket)
|
54
54
|
cached_region = S3::BUCKET_REGIONS[bucket]
|
55
|
-
if cached_region &&
|
55
|
+
if cached_region &&
|
56
|
+
cached_region != context.config.region &&
|
57
|
+
!S3Signer.custom_endpoint?(context)
|
56
58
|
context.http_request.endpoint.host = S3Signer.new_hostname(
|
57
59
|
context, cached_region
|
58
60
|
)
|
@@ -77,7 +79,7 @@ module Aws
|
|
77
79
|
def handle_region_errors(response)
|
78
80
|
if wrong_sigv4_region?(response) &&
|
79
81
|
!fips_region?(response) &&
|
80
|
-
!custom_endpoint?(response) &&
|
82
|
+
!S3Signer.custom_endpoint?(response.context) &&
|
81
83
|
!expired_credentials?(response)
|
82
84
|
get_region_and_retry(response.context)
|
83
85
|
else
|
@@ -106,15 +108,6 @@ module Aws
|
|
106
108
|
resp.context.http_response.body_contents.match(/<Code>ExpiredToken<\/Code>/)
|
107
109
|
end
|
108
110
|
|
109
|
-
def custom_endpoint?(resp)
|
110
|
-
region = resp.context.config.region
|
111
|
-
partition = Aws::Endpoints::Matchers.aws_partition(region)
|
112
|
-
endpoint = resp.context.http_request.endpoint
|
113
|
-
|
114
|
-
!endpoint.hostname.include?(partition['dnsSuffix']) &&
|
115
|
-
!endpoint.hostname.include?(partition['dualStackDnsSuffix'])
|
116
|
-
end
|
117
|
-
|
118
111
|
def wrong_sigv4_region?(resp)
|
119
112
|
resp.context.http_response.status_code == 400 &&
|
120
113
|
(resp.context.http_response.headers['x-amz-bucket-region'] ||
|
@@ -168,6 +161,15 @@ module Aws
|
|
168
161
|
context.config.endpoint_provider.resolve_endpoint(endpoint_params)
|
169
162
|
URI(endpoint.url).host
|
170
163
|
end
|
164
|
+
|
165
|
+
def custom_endpoint?(context)
|
166
|
+
region = context.config.region
|
167
|
+
partition = Aws::Endpoints::Matchers.aws_partition(region)
|
168
|
+
endpoint = context.http_request.endpoint
|
169
|
+
|
170
|
+
!endpoint.hostname.include?(partition['dnsSuffix']) &&
|
171
|
+
!endpoint.hostname.include?(partition['dualStackDnsSuffix'])
|
172
|
+
end
|
171
173
|
end
|
172
174
|
end
|
173
175
|
end
|
data/lib/aws-sdk-s3.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.120.
|
4
|
+
version: 1.120.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|