]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "rgw: Fix Host->bucket fallback logic inversion" 11102/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 15 Sep 2016 19:49:34 +0000 (15:49 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 15 Sep 2016 19:59:17 +0000 (15:59 -0400)
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 <cbodley@redhat.com>
src/rgw/rgw_rest.cc

index a32baa693b6e79bb33305ab684d7c343e35311fa..b7e0f60a06e32219d72d9bfe68f2b8aa7d482d4e 100644 (file)
@@ -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;
     }