From c3f346e3157ef56254b199ea46e26016166451e4 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Tue, 15 Sep 2020 14:20:04 -0400 Subject: [PATCH] rgw: advance pseudo-folders properly in delimited ordered listing The code mistakenly uses the current marker to figure out how to skip past a pseudo-directory. This could allow for some entries in a bucket to be skipped. The code should have used the current pseudo-directory to determine what to skip past. Signed-off-by: J. Eric Ivancich --- src/rgw/rgw_rados.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index bc4749589ab1..3bca9051f125 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2560,10 +2560,7 @@ int RGWRados::Bucket::List::list_objects_ordered( next_marker = prefix_key; (*common_prefixes)[prefix_key] = true; - int marker_delim_pos = cur_marker.name.find( - params.delim, cur_prefix.size()); - - skip_after_delim = cur_marker.name.substr(0, marker_delim_pos); + skip_after_delim = obj.name.substr(0, delim_pos); skip_after_delim.append(after_delim_s); ldout(cct, 20) << "skip_after_delim=" << skip_after_delim << dendl; -- 2.47.3