From b4dd18c676a49f1d4d15fadf9c672b44cb96c851 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 15 Sep 2016 15:49:34 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_rest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index a32baa693b6e7..b7e0f60a06e32 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; } -- 2.39.5