History

Merge branch 'fix-url-parse'

Sebastian Thiel committed 2 years ago

Commit 34eb0c92 parents a10a5fb 5366fa76 files · +11 −8Browse files

Unified · Split

6 files
  1. Cargo.lock +4 −4
  2. deny.toml +2 −1
  3. gix-url/Cargo.toml +2 −2
  4. gix-url/src/parse.rs +1 −1
  5. gix-url/tests/fixtures/fuzzed/short-panic.url +1 −0
  6. gix-url/tests/fuzzed.rs +1 −0
Cargo.lock+4−4
@@ -4934,9 +4934,9 @@ dependencies = [ · 4933 unmodified lines
4934 4934
4935[[package]]4935[[package]]
4936name = "unicode-bidi"4936name = "unicode-bidi"
4937version = "0.3.14"4937version = "0.3.15"
4938source = "registry+https://github.com/rust-lang/crates.io-index"4938source = "registry+https://github.com/rust-lang/crates.io-index"
4939checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416"4939checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
4940 4940
4941[[package]]4941[[package]]
4942name = "unicode-bom"4942name = "unicode-bom"
@@ -4985,9 +4985,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" · 42 unmodified lines
4985 4985
4986[[package]]4986[[package]]
4987name = "url"4987name = "url"
4988version = "2.5.0"4988version = "2.5.2"
4989source = "registry+https://github.com/rust-lang/crates.io-index"4989source = "registry+https://github.com/rust-lang/crates.io-index"
4990checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"4990checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
4991dependencies = [4991dependencies = [
4992 "form_urlencoded",4992 "form_urlencoded",
4993 "idna",4993 "idna",
deny.toml+2−1
@@ -31,7 +31,8 @@ allow = [ · 30 unmodified lines
31 "ISC",31 "ISC",
32 "Unicode-DFS-2016",32 "Unicode-DFS-2016",
33 "LicenseRef-ring",33 "LicenseRef-ring",
34 "Zlib"34 "Zlib",
35 "Unicode-3.0"
35]36]
36# The confidence threshold for detecting a license from license text.37# The confidence threshold for detecting a license from license text.
37# The higher the value, the more closely the license text must be to the38# The higher the value, the more closely the license text must be to the
gix-url/Cargo.toml+2−2
@@ -20,9 +20,9 @@ serde = ["dep:serde", "bstr/serde"] · 19 unmodified lines
20gix-features = { version = "^0.38.1", path = "../gix-features" }20gix-features = { version = "^0.38.1", path = "../gix-features" }
21gix-path = { version = "^0.10.7", path = "../gix-path" }21gix-path = { version = "^0.10.7", path = "../gix-path" }
22 22
23serde = { version = "1.0.114", optional = true, default-features = false, features = ["std", "derive"]}23serde = { version = "1.0.114", optional = true, default-features = false, features = ["std", "derive"] }
24thiserror = "1.0.32"24thiserror = "1.0.32"
25url = "2.5.0"25url = "2.5.1"
26bstr = { version = "1.3.0", default-features = false, features = ["std"] }26bstr = { version = "1.3.0", default-features = false, features = ["std"] }
27home = "0.5.5"27home = "0.5.5"
28 28
gix-url/src/parse.rs+1−1
@@ -183,7 +183,7 @@ pub(crate) fn file_url(input: &BStr, protocol_colon: usize) -> Result<crate::Url · 182 unmodified lines
183 // We cannot use the url crate to parse host and path because it special cases Windows183 // We cannot use the url crate to parse host and path because it special cases Windows
184 // driver letters. With the url crate an input of `file://x:/path/to/git` is parsed as empty184 // driver letters. With the url crate an input of `file://x:/path/to/git` is parsed as empty
185 // host and with `x:/path/to/git` as path. This behavior is wrong for Git which only follows185 // host and with `x:/path/to/git` as path. This behavior is wrong for Git which only follows
186 // that rule on Windows and parses `x:` as host on Unix platforms. Additionally the url crate186 // that rule on Windows and parses `x:` as host on Unix platforms. Additionally, the url crate
187 // does not account for Windows special UNC path support.187 // does not account for Windows special UNC path support.
188 188
189 // TODO: implement UNC path special case189 // TODO: implement UNC path special case
gix-url/tests/fixtures/fuzzed/short-panic.url+1−0
@@ -0,0 +1 @@
1ws://xn--55555577
gix-url/tests/fuzzed.rs+1−0
@@ -5,6 +5,7 @@ use bstr::ByteSlice; · 4 unmodified lines
5#[test]5#[test]
6fn fuzzed() {6fn fuzzed() {
7 for name in [7 for name in [
8 "short-panic",
8 "very-long-abort2",9 "very-long-abort2",
9 "very-long-abort",10 "very-long-abort",
10 "very-long6",11 "very-long6",