aws-sdk-s3 1.228.1 → 1.228.2
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 +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/encryptionV2/kms_cipher_provider.rb +14 -1
- data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +13 -1
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5957df832c6080c73dbf559974579e122f334320e4ce7c81a780f08e3b73b820
|
|
4
|
+
data.tar.gz: 4e3921416a74055d610ca07144e6e21aa846fe153fce09b065cc8e62f4ee5294
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: adc68f9009d30922126bed8afd6fe8ba849ce29f4aa623331f42d867341076e78a85a9b2784334657c0763f7d86a66d41dac7601a522bfa7fdfb8bebd261da76
|
|
7
|
+
data.tar.gz: e850c4122c4fb0304cd2b7c3cac882cc9e64883a43913a7c936f68bb21831f88c5f74936f092977c17b4d653a900438ff31fc47463c758973cd2477bb5593d62
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.228.2 (2026-07-30)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Issue - S3 Encryption Client, encryptionV2 and encryptionV3, returns a decryption error for a malformed material description.
|
|
8
|
+
|
|
4
9
|
1.228.1 (2026-07-23)
|
|
5
10
|
------------------
|
|
6
11
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.228.
|
|
1
|
+
1.228.2
|
data/lib/aws-sdk-s3/client.rb
CHANGED
|
@@ -24102,7 +24102,7 @@ module Aws::S3
|
|
|
24102
24102
|
tracer: tracer
|
|
24103
24103
|
)
|
|
24104
24104
|
context[:gem_name] = 'aws-sdk-s3'
|
|
24105
|
-
context[:gem_version] = '1.228.
|
|
24105
|
+
context[:gem_version] = '1.228.2'
|
|
24106
24106
|
Seahorse::Client::Request.new(handlers, context)
|
|
24107
24107
|
end
|
|
24108
24108
|
|
|
@@ -50,7 +50,7 @@ module Aws
|
|
|
50
50
|
# @return [Cipher] Given an encryption envelope, returns a
|
|
51
51
|
# decryption cipher.
|
|
52
52
|
def decryption_cipher(envelope, options = {})
|
|
53
|
-
encryption_context =
|
|
53
|
+
encryption_context = extract_encryption_context(envelope['x-amz-matdesc'])
|
|
54
54
|
cek_alg = envelope['x-amz-cek-alg']
|
|
55
55
|
|
|
56
56
|
case envelope['x-amz-wrap-alg']
|
|
@@ -115,6 +115,19 @@ module Aws
|
|
|
115
115
|
|
|
116
116
|
private
|
|
117
117
|
|
|
118
|
+
# Raise a decryption error for a malformed material description. A
|
|
119
|
+
# material description must be a JSON object.
|
|
120
|
+
def extract_encryption_context(matdesc)
|
|
121
|
+
context = Json.load(matdesc) if matdesc.is_a?(String)
|
|
122
|
+
unless context.is_a?(Hash)
|
|
123
|
+
raise Errors::DecryptionError, 'Malformed material description'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
context
|
|
127
|
+
rescue Aws::Json::ParseError, EncodingError
|
|
128
|
+
raise Errors::DecryptionError, 'Malformed material description'
|
|
129
|
+
end
|
|
130
|
+
|
|
118
131
|
def validate_key_wrap(key_wrap_schema)
|
|
119
132
|
case key_wrap_schema
|
|
120
133
|
when :kms_context then 'kms+context'
|
|
@@ -54,7 +54,7 @@ module Aws
|
|
|
54
54
|
cek_alg = envelope['x-amz-c']
|
|
55
55
|
encryption_context =
|
|
56
56
|
if !envelope['x-amz-t'].nil?
|
|
57
|
-
|
|
57
|
+
extract_encryption_context(envelope['x-amz-t'])
|
|
58
58
|
else
|
|
59
59
|
##= ../specification/s3-encryption/data-format/content-metadata.md#v3-only
|
|
60
60
|
##% If the mapkey x-amz-t is not present, the default Material Description value MUST be set to an empty map (`{}`).
|
|
@@ -102,6 +102,18 @@ module Aws
|
|
|
102
102
|
|
|
103
103
|
private
|
|
104
104
|
|
|
105
|
+
# Raise a decryption error for a malformed material description.
|
|
106
|
+
def extract_encryption_context(matdesc)
|
|
107
|
+
context = Json.load(matdesc) if matdesc.is_a?(String)
|
|
108
|
+
unless context.is_a?(Hash)
|
|
109
|
+
raise Errors::DecryptionError, 'Malformed material description'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
context
|
|
113
|
+
rescue Aws::Json::ParseError, EncodingError
|
|
114
|
+
raise Errors::DecryptionError, 'Malformed material description'
|
|
115
|
+
end
|
|
116
|
+
|
|
105
117
|
def validate_key_wrap(key_wrap_schema)
|
|
106
118
|
case key_wrap_schema
|
|
107
119
|
when :kms_context then '12'
|
data/lib/aws-sdk-s3.rb
CHANGED