Browse code

Fixes #1080 - url encode bucket_name for path-style requests. Fixes an issue with CephRGW and the tenant feature.

Florent Viard authored on 2020/03/26 07:06:25
Showing 1 changed files
... ...
@@ -297,7 +297,9 @@ class S3(object):
297 297
              or (bucket_name not in S3Request.redir_map
298 298
                 and not check_bucket_name_dns_support(self.config.host_bucket, bucket_name))
299 299
             ):
300
-                uri = "/%s%s" % (bucket_name, resource['uri'])
300
+                uri = "/%s%s" % (s3_quote(bucket_name, quote_backslashes=False,
301
+                                          unicode_output=True),
302
+                                 resource['uri'])
301 303
         else:
302 304
             uri = resource['uri']
303 305
         if base_path: