mirror of
https://github.com/matrix-org/synapse-s3-storage-provider.git
synced 2024-10-23 07:29:40 +00:00
Fix SSE-C extra_arg checks (#87)
Fixes https://github.com/matrix-org/synapse-s3-storage-provider/issues/86
This commit is contained in:
parent
52be2ef613
commit
c65f9e5ba5
2 changed files with 2 additions and 2 deletions
|
@ -205,7 +205,7 @@ def s3_download_task(s3_client, bucket, key, extra_args, deferred, parent_logcon
|
|||
logger.info("Fetching %s from S3", key)
|
||||
|
||||
try:
|
||||
if extra_args["SSECustomerKey"] and extra_args["SSECustomerAlgorithm"]:
|
||||
if "SSECustomerKey" in extra_args and "SSECustomerAlgorithm" in extra_args:
|
||||
resp = s3_client.get_object(
|
||||
Bucket=bucket,
|
||||
Key=key,
|
||||
|
|
|
@ -171,7 +171,7 @@ def check_file_in_s3(s3, bucket, key, extra_args):
|
|||
"""Check the file exists in S3 (though it could be different)
|
||||
"""
|
||||
try:
|
||||
if extra_args["SSECustomerKey"] and extra_args["SSECustomerAlgorithm"]:
|
||||
if "SSECustomerKey" in extra_args and "SSECustomerAlgorithm" in extra_args:
|
||||
s3.head_object(
|
||||
Bucket=bucket,
|
||||
Key=key,
|
||||
|
|
Loading…
Reference in a new issue