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: v16.1.0~2445^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c4594a6aa6db0aee05287a82eaa937f715dc8b0;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 --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 8b2eb75cafa..faba8dadc52 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