You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pass the source's SSE-C and RequestPayer parameters to the lookups of copies and setxattr #1333
Copies and metadata replacement look up the source object without the authorization parameters that the call carries, so an SSE-C source, or a requester-pays source with a per-call RequestPayer, cannot be copied: the lookup fails before CopyObject is sent.
Expected: the copy succeeds. S3Core already maps these parameters to the source lookups (S3Core._copy_source_params), and plan_multipart_copy uses that mapping.
Actual: HeadObject is sent with only Bucket and Key; S3 answers 400 for an SSE-C object, which surfaces as OSError(EINVAL). Whether it fails depends on the cache: a cached parent listing answers info() without a request.
S3FileSystem._copy_file: info1 = self.info(path1) (s3.py:1604), and the same in AioS3FileSystem._copy_file (s3_async.py:576).
S3FileSystem._move_pairs: self._head_object(source) (s3.py:1440) for the conflict check of mv.
mv's delete of the copied sources receives none of the call's parameters (s3.py:1398).
setxattr: head = self.metadata(path) (s3.py:2132) without the lookup parameters of copy_kwargs.
The existing test test_copy_object_with_multipart_upload_sse_c_source calls _copy_object_with_multipart_upload directly and skips the lookup.
Fix direction
Make the source-lookup mapping a public S3Core method next to the destination-side operation_params, and pass its result to every source lookup above, in both filesystems; pass DeleteObjects-accepted parameters to mv's delete. Reproduced offline with botocore's Stubber: the HeadObject request of cp_file, setxattr, and cp_file(..., RequestPayer="requester") carried only Bucket and Key.
Activity