Reject ambiguously parsed URLs (#16622)

Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
William Woodruff
2025-11-12 11:27:57 -05:00
committed by GitHub
parent 82c612704a
commit ae1edef9c0
30 changed files with 257 additions and 97 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ use uv_extract::hash::Hasher;
use uv_fs::{Simplified, rename_with_retry};
use uv_platform::{self as platform, Arch, Libc, Os, Platform};
use uv_pypi_types::{HashAlgorithm, HashDigest};
use uv_redacted::DisplaySafeUrl;
use uv_redacted::{DisplaySafeUrl, DisplaySafeUrlError};
use uv_static::EnvVars;
use crate::PythonVariant;
@@ -75,7 +75,7 @@ pub enum Error {
actual: String,
},
#[error("Invalid download URL")]
InvalidUrl(#[from] url::ParseError),
InvalidUrl(#[from] DisplaySafeUrlError),
#[error("Invalid download URL: {0}")]
InvalidUrlFormat(DisplaySafeUrl),
#[error("Invalid path in file URL: `{0}`")]