From: Casey Bodley Date: Thu, 15 Sep 2016 19:49:34 +0000 (-0400) Subject: Revert "rgw: Fix Host->bucket fallback logic inversion" X-Git-Tag: v11.0.1~222^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4dd18c676a49f1d4d15fadf9c672b44cb96c851;p=ceph.git Revert "rgw: Fix Host->bucket fallback logic inversion" This reverts commit 0e0a4bc3dcb61c2e8dfe65daefe207c62b36306c. this commit, while logically correct, causes us to add a / to the end of the request_uri. this breaks signature verification, because the initial signature was generated without the / Fixes: http://tracker.ceph.com/issues/17279 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index a32baa693b6..b7e0f60a06e 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1826,7 +1826,7 @@ int RGWREST::preprocess(struct req_state *s, RGWClientIO* cio) if (subdomain.empty() && (domain.empty() || domain != info.host) && !looks_like_ip_address(info.host.c_str()) - && RGWHandler_REST::validate_bucket_name(info.host) == 0) { + && RGWHandler_REST::validate_bucket_name(info.host)) { subdomain.append(info.host); in_hosted_domain = 1; }