There was an error while loading. Please reload this page.
1 parent c52eddf commit 054e6f4Copy full SHA for 054e6f4
1 file changed
crates/core/src/alias.rs
@@ -618,6 +618,17 @@ mod tests {
618
assert!(!error.contains("SECRET"));
619
}
620
621
+ #[test]
622
+ fn test_parse_rc_host_alias_rejects_non_utf8_percent_encoded_secret_key() {
623
+ let result = parse_env_alias("invalid", "https://ACCESS_KEY:SECRET%FF@rustfs.local");
624
+
625
+ assert!(result.is_err());
626
+ let error = result.unwrap_err().to_string();
627
+ assert!(error.contains("invalid percent-encoding in secret key"));
628
+ assert!(!error.contains("ACCESS_KEY"));
629
+ assert!(!error.contains("SECRET"));
630
+ }
631
632
#[test]
633
fn test_parse_rc_host_alias_rejects_invalid_access_key_percent_encoding() {
634
let result = parse_env_alias("invalid", "https://ACCESS%ZZKEY:SECRET_KEY@rustfs.local");
0 commit comments