]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_bucket: clear tenant string for non tenanted buckets 34815/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:53:48 +0000 (23:53 -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 c314529cdc173213a7ce133fddda7493c8dab894..67b496f33c86128ed120a5ee1098897ce4f61930 100644 (file)
@@ -372,6 +372,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