]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_bucket: clear tenant string for non tenanted buckets 34877/head
authorVikhyat Umrao <vikhyat@redhat.com>
Fri, 1 May 2020 15:28:55 +0000 (08:28 -0700)
committerVikhyat Umrao <vikhyat@redhat.com>
Fri, 1 May 2020 15:28:55 +0000 (08:28 -0700)
in rgw_bucket_parse_bucket_key function.

Fixes: https://tracker.ceph.com/issues/45355
Signed-off-by: Vikhyat Umrao <vikhyat@redhat.com>
src/rgw/rgw_bucket.cc

index 8b2eb75cafa85bcd5b23bc93c44b6fcd078646c9..faba8dadc528d9d46af9e4a71f5a73749e0ca9a4 100644 (file)
@@ -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