mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			7c09b7c73e
			...
			9d7a892355
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					9d7a892355 | ||
| 
						 | 
					32cfd1ed52 | 
@ -512,10 +512,13 @@ def list_target_files(config):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		# connect to the region & bucket
 | 
							# connect to the region & bucket
 | 
				
			||||||
		try:
 | 
							try:
 | 
				
			||||||
			s3 = boto3.client('s3', \
 | 
								if config['target_user'] == "" and config['target_pass'] == "":
 | 
				
			||||||
				endpoint_url=f'https://{target.hostname}', \
 | 
									s3 = boto3.client('s3', endpoint_url=f'https://{target.hostname}')
 | 
				
			||||||
				aws_access_key_id=config['target_user'], \
 | 
								else:
 | 
				
			||||||
				aws_secret_access_key=config['target_pass'])
 | 
									s3 = boto3.client('s3', \
 | 
				
			||||||
 | 
										endpoint_url=f'https://{target.hostname}', \
 | 
				
			||||||
 | 
										aws_access_key_id=config['target_user'], \
 | 
				
			||||||
 | 
										aws_secret_access_key=config['target_pass'])
 | 
				
			||||||
			bucket_objects = s3.list_objects_v2(Bucket=bucket, Prefix=path)['Contents']
 | 
								bucket_objects = s3.list_objects_v2(Bucket=bucket, Prefix=path)['Contents']
 | 
				
			||||||
			backup_list = [(key['Key'][len(path):], key['Size']) for key in bucket_objects]
 | 
								backup_list = [(key['Key'][len(path):], key['Size']) for key in bucket_objects]
 | 
				
			||||||
		except ClientError as e:
 | 
							except ClientError as e:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user