File tree Expand file tree Collapse file tree 3 files changed +310
-451
lines changed Expand file tree Collapse file tree 3 files changed +310
-451
lines changed Original file line number Diff line number Diff line change 1
1
Unreleased Changes
2
2
------------------
3
3
4
+ * Issue - Fix bug where destination bucket default encryption was inadvertently overridden by source object encryption.
5
+
4
6
1.149.0 (2024-04-30)
5
7
------------------
6
8
@@ -167,7 +169,7 @@ Unreleased Changes
167
169
1.123.2 (2023-06-12)
168
170
------------------
169
171
170
- * Issue - Fix issue when decrypting noncurrent versions of objects when using client side encryption (#2866 ).
172
+ * Issue - Fix issue when decrypting noncurrent versions of objects when using client side encryption (#2866 ).
171
173
172
174
1.123.1 (2023-06-02)
173
175
------------------
Original file line number Diff line number Diff line change @@ -138,9 +138,7 @@ def source_has_parts(options)
138
138
end
139
139
140
140
def source_metadata ( options )
141
- if options [ :content_length ]
142
- return { content_length : options . delete ( :content_length ) }
143
- end
141
+ return options . slice ( :content_length ) if options [ :content_length ]
144
142
145
143
client = options [ :copy_source_client ] || @client
146
144
@@ -150,11 +148,15 @@ def source_metadata(options)
150
148
bucket , key = options [ :copy_source ] . match ( /([^\/ ]+?)\/ (.+)/ ) [ 1 , 2 ]
151
149
end
152
150
153
- key = CGI . unescape ( key )
154
- opts = { bucket : bucket , key : key }
155
- opts [ :version_id ] = version_id if version_id
156
- opts [ :part_number ] = options [ :part_number ] if options [ :part_number ]
157
- client . head_object ( opts ) . to_h
151
+ head_opts = { bucket : bucket , key : CGI . unescape ( key ) } . tap { |opts |
152
+ opts [ :version_id ] = version_id if version_id
153
+ opts [ :part_number ] = options [ :part_number ] if options [ :part_number ]
154
+ }
155
+
156
+ client . head_object ( head_opts ) . to_h . tap { |head |
157
+ head . delete ( :server_side_encryption )
158
+ head . delete ( :ssekms_key_id )
159
+ }
158
160
end
159
161
160
162
def default_part_size ( source_size )
You can’t perform that action at this time.
0 commit comments