diff --git a/storage/cloud.py b/storage/cloud.py index 9148819dd..81c602471 100644 --- a/storage/cloud.py +++ b/storage/cloud.py @@ -402,6 +402,9 @@ class S3Storage(_CloudStorage): } connect_kwargs = {} if host: + if host.startswith('http:') or host.startswith('https:'): + raise ValueError('host name must not start with http:// or https://') + connect_kwargs['host'] = host super(S3Storage, self).__init__(boto.s3.connection.S3Connection, boto.s3.key.Key, connect_kwargs, upload_params, storage_path, s3_access_key,