Actions
Bug #80924
open
KB
KB
rgw: If-Match and If-None-Match match any value that starts with the object's ETag
Bug #80924:
rgw: If-Match and If-None-Match match any value that starts with the object's ETag
Due date:
% Done:
0%
Source:
Backport:
tentacle, umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Description
Found reviewing RGW's parsers against AWS's Smithy model of S3. Reproduced on main at 7ed73efc1be on a single-host vstart cluster. By code review, tentacle has the same code.
If-Match:if_match_str.compare(0, etag.length(), etag, ...)incheck_preconditions(rgw_rados.cc:7868), and in the read path (rgw_rados.cc:8459);If-None-Match: the same, atrgw_rados.cc:7890and8474.
- any value that starts with the ETag matches it;
- a list of ETags matches only when the first is the object's;
- a weak ETag (
W/"...") never matches.
RFC 7232 compares whole entity tags, and allows a list.
Reproducer: test_put_object_if_match_etag_with_suffix in s3-tests. A PutObject whose If-Match is the object's ETag with one more character is accepted, not answered 412.
A fix could parse the header as a list of entity tags (or *) and compare each whole, unquoted value, in all four places.
KB Updated by Kyle Bader 2 months ago
- Related to Bug #64439: If-Match Header Not Unquoted On Conditional PutObject added
MH Updated by Matthew Heler 2 months ago
- Status changed from New to Fix Under Review
- Assignee set to Kyle Bader
- Backport changed from tentacle to tentacle, umbrella
- Pull request ID set to 72117
Actions