We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19e1b7b commit 8d4f9d7Copy full SHA for 8d4f9d7
gix-url/fuzz/fuzz_targets/parse.rs
@@ -9,7 +9,11 @@ fn fuzz(data: &[u8]) -> Result<()> {
9
_ = black_box(url.user());
10
_ = black_box(url.password());
11
12
- _ = black_box(url.host_argument_safe());
+ if let Some(safe_host) = black_box(url.host_argument_safe()) {
13
+ // Ensure malicious host paths can't be returned see;
14
+ // https://secure.phabricator.com/T12961
15
+ assert!(!safe_host.starts_with("ssh://-"));
16
+ }
17
_ = black_box(url.path_argument_safe());
18
_ = black_box(url.path_is_root());
19
_ = black_box(url.port_or_default());
0 commit comments