Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: rgw: fix marker encoding problem. #20123

Closed
wants to merge 1 commit into from

Conversation

mattbenjamin
Copy link
Contributor

For object names that contain / and %, it is possible in
some circumstances (at least with boto) for "listobjects"
operations to attempt to fetch additional objects using
'marker=' and a value containing both / and %. When this
happens, when using AWSv4, radosgw returns a signature
validation error. It's possible to artifically do this
in boto on any bucket (regardless of content) with
sometihng like s=bucket.get_all_keys(marker='level1/8e%25%25FAH3')
this fails because "recoder" assumes the query string
was already encoded if any value is encoded, and fails
to take into account that the string might be partially
encoded, as in this case.

The fix here is to always decode the value, then always encode.

Fixes: http://tracker.ceph.com/issues/20463
Signed-off-by: Marcus Watts mwatts@redhat.com
(cherry picked from commit f1ed745)
Signed-off-by: Orit Wasserman owasserm@redhat.com

Conflicts:
src/rgw/rgw_auth_s3.cc

(cherry picked from commit 34cf013)

For object names that contain / and %, it is possible in
some circumstances (at least with boto) for "listobjects"
operations to attempt to fetch additional objects using
'marker=' and a value containing both / and %.  When this
happens, when using AWSv4, radosgw returns a signature
validation error.  It's possible to artifically do this
in boto on any bucket (regardless of content) with
sometihng like s=bucket.get_all_keys(marker='level1/8e%25%25FAH3')
this fails because "recoder" assumes the query string
was already encoded if any value is encoded, and fails
to take into account that the string might be partially
encoded, as in this case.

The fix here is to always decode the value, then always encode.

Fixes: http://tracker.ceph.com/issues/20463
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit f1ed745)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>

Conflicts:
	src/rgw/rgw_auth_s3.cc

(cherry picked from commit 34cf013)
@mattbenjamin mattbenjamin added this to the jewel milestone Jan 25, 2018
@mattbenjamin mattbenjamin self-assigned this Jan 25, 2018
@mattbenjamin mattbenjamin changed the title rgw: fix marker encoding problem. jewel:rgw: fix marker encoding problem. Jan 25, 2018
@mattbenjamin mattbenjamin changed the title jewel:rgw: fix marker encoding problem. jewel: rgw: fix marker encoding problem. Jan 25, 2018
Copy link
Contributor

@smithfarm smithfarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this different from #17731 ?

@mattbenjamin
Copy link
Contributor Author

@smithfarm it's not--I have no idea how the older PR went unmerged since sept 14--we need to merge one of these asap

@smithfarm
Copy link
Contributor

Closing as duplicate of #17731

@smithfarm smithfarm closed this Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants