supporting signed urls for private keys

This commit is contained in:
Jack Danger 2017-09-22 10:42:13 -07:00
commit ea66a71765
2 changed files with 13 additions and 7 deletions

View file

@ -548,8 +548,10 @@ class ResponseObject(_TemplateEnvironmentMixin):
# header.
if 'Authorization' not in request.headers:
key = self.backend.get_key(bucket_name, key_name)
if key and not key.acl.public_read:
return 403, {}, ""
signed_url = 'Signature=' in request.url
if key:
if not key.acl.public_read and not signed_url:
return 403, {}, ""
if hasattr(request, 'body'):
# Boto