Two low-risk robustness nits raised in the #217 review that were intentionally deferred (server responses are trusted, so real-world risk is low):
-
GetObjectAttributes silently coerces malformed numeric XML to 0.
In src/s3/response/get_object_attributes.rs, parse_u32 / parse_u64 use unwrap_or(0), so a malformed or unexpected numeric field (e.g. ObjectSize, part numbers) is silently treated as 0 instead of surfacing a parse error.
-
DeleteObjects response does not validate the non-error root element name.
In src/s3/response/delete_object.rs, parse_delete_objects checks for a root <Error> element but otherwise iterates children without first confirming the root is the expected <DeleteResult> element.
Context: follow-up to #217 (CodeRabbit review).
Two low-risk robustness nits raised in the #217 review that were intentionally deferred (server responses are trusted, so real-world risk is low):
GetObjectAttributes silently coerces malformed numeric XML to
0.In
src/s3/response/get_object_attributes.rs,parse_u32/parse_u64useunwrap_or(0), so a malformed or unexpected numeric field (e.g.ObjectSize, part numbers) is silently treated as0instead of surfacing a parse error.DeleteObjects response does not validate the non-error root element name.
In
src/s3/response/delete_object.rs,parse_delete_objectschecks for a root<Error>element but otherwise iterates children without first confirming the root is the expected<DeleteResult>element.Context: follow-up to #217 (CodeRabbit review).