]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: RGWSI_User_Module filters '.buckets' objects out of user listing
authorCasey Bodley <cbodley@redhat.com>
Thu, 15 Aug 2019 17:13:39 +0000 (13:13 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 15 Aug 2019 17:13:43 +0000 (13:13 -0400)
Fixes: https://tracker.ceph.com/issues/41300
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/services/svc_user_rados.cc

index 28858069bd9589186e5ce3ef7eac977b7abe9935..1d16db9ce71c69e5fa5582b79dc86569f220235b 100644 (file)
@@ -1,4 +1,4 @@
-
+#include <boost/algorithm/string.hpp>
 
 #include "svc_user.h"
 #include "svc_user_rados.h"
@@ -43,7 +43,8 @@ public:
   }
 
   bool is_valid_oid(const string& oid) override {
-    return true;
+    // filter out the user.buckets objects
+    return !boost::algorithm::ends_with(oid, RGW_BUCKETS_OBJ_SUFFIX);
   }
 
   string key_to_oid(const string& key) override {