dwsmith1983 commented on code in PR #7556:
URL: https://github.com/apache/datafusion-comet/pull/7556#discussion_r4559280254
##########
native/core/src/parquet/objectstore/s3_blob_fs_support.rs:
##########
@@ -523,4 +525,30 @@ mod tests {
// than opening a bucketless URL. (The JVM gate already declines
these; defense in depth.)
assert!(promote_hostless_alias_url("blob:///").is_err());
}
+
+ #[test]
+ fn promote_errors_do_not_echo_the_url() {
+ let err =
+
promote_hostless_alias_url("blob://alice:SECRET@bucket:notaport/x?sig=SAS-MARKER")
+ .unwrap_err()
+ .to_string();
+ for leaked in ["alice", "SECRET", "SAS-MARKER"] {
+ assert!(!err.contains(leaked), "{leaked} echoed: {err}");
+ }
+ assert!(
+ err.contains("Error parsing blob URL: invalid port number"),
+ "{err}"
+ );
+ }
Review Comment:
Moved it into `parse_errors_name_only_a_valid_scheme` in b749d6880.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]