dwsmith1983 opened a new issue, #3746:
URL: https://github.com/apache/iceberg-rust/issues/3746

   ### Apache Iceberg Rust version
   
   main (a7160a0)
   
   ### Describe the bug
   
   Several errors in `crates/storage/opendal` format the path they were given 
with `{path}`:
   
   - `lib.rs` 493, 502, 515, 532, 662, 671, 681, 690, 705, 714, 727 (`Invalid 
s3 url: {path} ...`, and the gcs, oss and hf equivalents)
   - `s3.rs` 208 (`Invalid s3 url: {path}, missing bucket`)
   
   A location with a password in its userinfo is printed as is. Such a location 
also always hits one of these errors: the bucket comes from the URL host, so 
`s3://alice:SECRET@bucket/t/f.parquet` fails the `starts_with("s3://bucket/")` 
check. So every time a location like this is used, the secret ends up in the 
error and in whatever logs it.
   
   ### To Reproduce
   
   Open `s3://alice:SECRET@bucket/t/f.parquet` through an S3 `FileIO` (for 
example `new_input(...)`). The error reads `Invalid s3 url: 
s3://alice:SECRET@bucket/t/f.parquet, should start with s3://bucket/`.
   
   ### Expected behavior
   
   These messages show the path without its password, and ideally without its 
query string, which can hold a signature. Dropping userinfo and query from the 
displayed path (for example through `url::Url`'s `set_password(None)` and 
`set_query(None)`) would be enough.
   
   ### Willingness to contribute
   
   I can contribute a fix for this bug independently
   


-- 
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]

Reply via email to