hcrosse commented on code in PR #921:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/921#discussion_r4713443807


##########
src/aws/client.rs:
##########
@@ -491,6 +499,84 @@ impl Request<'_> {
     }
 }
 
+pub(crate) async fn validate_copy_response(response: HttpResponse) -> 
Result<()> {
+    let data = response
+        .into_body()
+        .bytes()
+        .await
+        .map_err(|source| Error::CopyResponseBody { source })?;
+
+    let body = std::str::from_utf8(&data).map_err(|source| 
Error::InvalidCopyResponse {
+        source: Box::new(source),
+    })?;
+
+    let mut reader = quick_xml::Reader::from_str(body);
+    let mut depth: usize = 0;
+    let mut saw_root = false;
+
+    loop {
+        match reader.read_event() {

Review Comment:
   Validated attributes with `normalized_value_with` (enabling 
`expand_empty_elements` so start and empty tags share one path) and added 
entity reference validation for `Event::GeneralRef`, plus regression cases for 
both.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to