From: Vikhyat Umrao Date: Fri, 1 May 2020 15:28:55 +0000 (-0700) Subject: rgw/rgw_bucket: clear tenant string for non tenanted buckets X-Git-Tag: v15.2.2~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e207f928df747c03dc3c24b2c02013f357f361e6;p=ceph.git rgw/rgw_bucket: clear tenant string for non tenanted buckets in rgw_bucket_parse_bucket_key function. Fixes: https://tracker.ceph.com/issues/45355 Signed-off-by: Vikhyat Umrao (cherry picked from commit 6c4594a6aa6db0aee05287a82eaa937f715dc8b0) --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 58b22827a59a..2e1e8b39ac2a 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -207,6 +207,8 @@ int rgw_bucket_parse_bucket_key(CephContext *cct, const string& key, auto tenant = name.substr(0, pos); bucket->tenant.assign(tenant.begin(), tenant.end()); name = name.substr(pos + 1); + } else { + bucket->tenant.clear(); } // split name:instance