Skip to content

Commit

Permalink
Merge branch 'fix-url-parse'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jun 19, 2024
2 parents a10a5fb + 5366fa7 commit 34eb0c9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ allow = [
"ISC",
"Unicode-DFS-2016",
"LicenseRef-ring",
"Zlib"
"Zlib",
"Unicode-3.0"
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
Expand Down
4 changes: 2 additions & 2 deletions gix-url/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ serde = ["dep:serde", "bstr/serde"]
gix-features = { version = "^0.38.1", path = "../gix-features" }
gix-path = { version = "^0.10.7", path = "../gix-path" }

serde = { version = "1.0.114", optional = true, default-features = false, features = ["std", "derive"]}
serde = { version = "1.0.114", optional = true, default-features = false, features = ["std", "derive"] }
thiserror = "1.0.32"
url = "2.5.0"
url = "2.5.1"
bstr = { version = "1.3.0", default-features = false, features = ["std"] }
home = "0.5.5"

Expand Down
2 changes: 1 addition & 1 deletion gix-url/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub(crate) fn file_url(input: &BStr, protocol_colon: usize) -> Result<crate::Url
// We cannot use the url crate to parse host and path because it special cases Windows
// driver letters. With the url crate an input of `file://x:/path/to/git` is parsed as empty
// host and with `x:/path/to/git` as path. This behavior is wrong for Git which only follows
// that rule on Windows and parses `x:` as host on Unix platforms. Additionally the url crate
// that rule on Windows and parses `x:` as host on Unix platforms. Additionally, the url crate
// does not account for Windows special UNC path support.

// TODO: implement UNC path special case
Expand Down
1 change: 1 addition & 0 deletions gix-url/tests/fixtures/fuzzed/short-panic.url
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ws://xn--55555577
1 change: 1 addition & 0 deletions gix-url/tests/fuzzed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use bstr::ByteSlice;
#[test]
fn fuzzed() {
for name in [
"short-panic",
"very-long-abort2",
"very-long-abort",
"very-long6",
Expand Down

0 comments on commit 34eb0c9

Please sign in to comment.