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

Fixes: https://tracker.ceph.com/issues/45355
Signed-off-by: Vikhyat Umrao <vikhyat@redhat.com>
(cherry picked from commit 6c4594a6aa6db0aee05287a82eaa937f715dc8b0)

src/rgw/rgw_bucket.cc

index 58b22827a59a439589239752288720ba814f8d4e..2e1e8b39ac2adfb03f6205a9cbdf20eaf9fd79cc 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