]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: advance pseudo-folders properly in delimited ordered listing 37169/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Tue, 15 Sep 2020 18:20:04 +0000 (14:20 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 15 Sep 2020 20:33:11 +0000 (16:33 -0400)
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 <ivancich@redhat.com>
src/rgw/rgw_rados.cc

index bc4749589ab1d70ae67410a1784a98e0862b611f..3bca9051f125505408d149e661ad1d481ea68a07 100644 (file)
@@ -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;