aws-sdk-core 3.241.0 → 3.241.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 523acda999896709fbdf9cc01dd8b2118562458c0b53e7630bf668840ae7d2f7
4
- data.tar.gz: 8243e904b358bb297810c58fd3038044f8d89835aa4bc49ce8e767b8cba235d7
3
+ metadata.gz: c48d0632bd5c5e63a69c8688ee51b535b20eada9eaab757aad910a6482481eaa
4
+ data.tar.gz: 863c77cf8b07e9427043df1a8d37c2b7920518906eaf9c25951439e0f40ba1c7
5
5
  SHA512:
6
- metadata.gz: 2513bbcb56a3aebebc25793ce65baec8931987fdf99481a6b2e4745c57e0b14fddd003e5c87aa3e59b542f5da8f811d864bfd47f6063999a4bd554dc126d66bf
7
- data.tar.gz: 6b75f7e235c7153fe1a7f0f2b9b4e6b7e877ae88baaf67ce9dedc4e718450b2743201efa695985abaf6386be28cfd72ab53dff09ee05957aecf1b2ca28c6bf3c
6
+ metadata.gz: fb84da80b12823243e720171670cf15c55df4173460d159ead8f80ef93462d5b95fe7aad18458818d8f097c43972073adbfe4889bc8347a39a3a41e2266d57f7
7
+ data.tar.gz: 681a5d0046532c1a1ce3bd8df590ab5fab1e6154b99fd600bdc8e9cdcc7b50b023953efbcda59d2927ad314121be4e18da5f50edf25fe93019d483e3a9b1a78b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.241.1 (2026-01-06)
5
+ ------------------
6
+
7
+ * Issue - Fix memory leak in ClockSkew retry plugin by normalizing endpoints to prevent unlimited hash growth.
8
+
4
9
  3.241.0 (2026-01-05)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.241.0
1
+ 3.241.1
@@ -3,10 +3,8 @@
3
3
  module Aws
4
4
  module Plugins
5
5
  module Retries
6
-
7
6
  # @api private
8
7
  class ClockSkew
9
-
10
8
  CLOCK_SKEW_THRESHOLD = 5 * 60 # five minutes
11
9
 
12
10
  def initialize
@@ -22,9 +20,9 @@ module Aws
22
20
  end
23
21
 
24
22
  # Gets the clock_correction in seconds to apply to a given endpoint
25
- # @param endpoint [URI / String]
23
+ # @param endpoint [URI, String]
26
24
  def clock_correction(endpoint)
27
- @mutex.synchronize { @endpoint_clock_corrections[endpoint.to_s] }
25
+ @mutex.synchronize { @endpoint_clock_corrections[normalized_endpoint(endpoint)] }
28
26
  end
29
27
 
30
28
  # The estimated skew factors in any clock skew from
@@ -35,7 +33,7 @@ module Aws
35
33
  # Estimated Skew should not be used to correct clock skew errors
36
34
  # it should only be used to estimate TTL for a request
37
35
  def estimated_skew(endpoint)
38
- @mutex.synchronize { @endpoint_estimated_skews[endpoint.to_s] }
36
+ @mutex.synchronize { @endpoint_estimated_skews[normalized_endpoint(endpoint)] }
39
37
  end
40
38
 
41
39
  # Determines whether a request has clock skew by comparing
@@ -55,9 +53,9 @@ module Aws
55
53
  endpoint = context.http_request.endpoint
56
54
  now_utc = Time.now.utc
57
55
  server_time = server_time(context.http_response)
58
- if server_time && (now_utc - server_time).abs > CLOCK_SKEW_THRESHOLD
59
- set_clock_correction(endpoint, server_time - now_utc)
60
- end
56
+ return unless server_time && (now_utc - server_time).abs > CLOCK_SKEW_THRESHOLD
57
+
58
+ set_clock_correction(normalized_endpoint(endpoint), server_time - now_utc)
61
59
  end
62
60
 
63
61
  # Called for every request
@@ -69,20 +67,35 @@ module Aws
69
67
  now_utc = Time.now.utc
70
68
  server_time = server_time(context.http_response)
71
69
  return unless server_time
70
+
72
71
  @mutex.synchronize do
73
- @endpoint_estimated_skews[endpoint.to_s] = server_time - now_utc
72
+ @endpoint_estimated_skews[normalized_endpoint(endpoint)] = server_time - now_utc
74
73
  end
75
74
  end
76
75
 
77
76
  private
78
77
 
78
+ ##
79
+ # @param endpoint [URI, String]
80
+ # the endpoint to normalize
81
+ #
82
+ # @return [String]
83
+ # the endpoint's schema, host, and port - without any path or query arguments
84
+ def normalized_endpoint(endpoint)
85
+ uri = endpoint.is_a?(URI::Generic) ? endpoint : URI(endpoint.to_s)
86
+
87
+ return endpoint.to_s unless uri.scheme && uri.host
88
+
89
+ "#{uri.scheme}://#{uri.host}:#{uri.port}"
90
+ rescue URI::InvalidURIError
91
+ endpoint.to_s
92
+ end
93
+
79
94
  # @param response [Seahorse::Client::Http::Response:]
80
95
  def server_time(response)
81
- begin
82
- Time.parse(response.headers['date']).utc
83
- rescue
84
- nil
85
- end
96
+ Time.parse(response.headers['date']).utc
97
+ rescue StandardError
98
+ nil
86
99
  end
87
100
 
88
101
  # Sets the clock correction for an endpoint
@@ -90,11 +103,10 @@ module Aws
90
103
  # @param correction [Number]
91
104
  def set_clock_correction(endpoint, correction)
92
105
  @mutex.synchronize do
93
- @endpoint_clock_corrections[endpoint.to_s] = correction
106
+ @endpoint_clock_corrections[normalized_endpoint(endpoint)] = correction
94
107
  end
95
108
  end
96
109
  end
97
110
  end
98
111
  end
99
112
  end
100
-
@@ -579,7 +579,7 @@ module Aws::Signin
579
579
  tracer: tracer
580
580
  )
581
581
  context[:gem_name] = 'aws-sdk-core'
582
- context[:gem_version] = '3.241.0'
582
+ context[:gem_version] = '3.241.1'
583
583
  Seahorse::Client::Request.new(handlers, context)
584
584
  end
585
585
 
@@ -56,7 +56,7 @@ module Aws::Signin
56
56
  autoload :EndpointProvider, 'aws-sdk-signin/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-signin/endpoints'
58
58
 
59
- GEM_VERSION = '3.241.0'
59
+ GEM_VERSION = '3.241.1'
60
60
 
61
61
  end
62
62
 
@@ -698,7 +698,7 @@ module Aws::SSO
698
698
  tracer: tracer
699
699
  )
700
700
  context[:gem_name] = 'aws-sdk-core'
701
- context[:gem_version] = '3.241.0'
701
+ context[:gem_version] = '3.241.1'
702
702
  Seahorse::Client::Request.new(handlers, context)
703
703
  end
704
704
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.241.0'
59
+ GEM_VERSION = '3.241.1'
60
60
 
61
61
  end
62
62
 
@@ -1081,7 +1081,7 @@ module Aws::SSOOIDC
1081
1081
  tracer: tracer
1082
1082
  )
1083
1083
  context[:gem_name] = 'aws-sdk-core'
1084
- context[:gem_version] = '3.241.0'
1084
+ context[:gem_version] = '3.241.1'
1085
1085
  Seahorse::Client::Request.new(handlers, context)
1086
1086
  end
1087
1087
 
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.241.0'
59
+ GEM_VERSION = '3.241.1'
60
60
 
61
61
  end
62
62
 
@@ -2725,7 +2725,7 @@ module Aws::STS
2725
2725
  tracer: tracer
2726
2726
  )
2727
2727
  context[:gem_name] = 'aws-sdk-core'
2728
- context[:gem_version] = '3.241.0'
2728
+ context[:gem_version] = '3.241.1'
2729
2729
  Seahorse::Client::Request.new(handlers, context)
2730
2730
  end
2731
2731
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.241.0'
59
+ GEM_VERSION = '3.241.1'
60
60
 
61
61
  end
62
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.241.0
4
+ version: 3.241.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services