mirror of https://github.com/astral-sh/uv
Respect `UV_INSECURE_NO_ZIP_VALIDATION=1` in duplicate header errors (#15912)
## Summary This was just an oversight on these specific returns. Closes https://github.com/astral-sh/uv/issues/15871.
This commit is contained in:
parent
dea1700945
commit
2a14edf75c
|
|
@ -206,9 +206,11 @@ pub async fn unzip<R: tokio::io::AsyncRead + Unpin>(
|
|||
|
||||
// Verify that the existing file contents match the expected contents.
|
||||
if existing_contents != expected_contents {
|
||||
return Err(Error::DuplicateLocalFileHeader {
|
||||
path: relpath.clone(),
|
||||
});
|
||||
if !skip_validation {
|
||||
return Err(Error::DuplicateLocalFileHeader {
|
||||
path: relpath.clone(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
(bytes_read as u64, entry_reader)
|
||||
|
|
@ -455,9 +457,11 @@ pub async fn unzip<R: tokio::io::AsyncRead + Unpin>(
|
|||
}
|
||||
std::collections::hash_map::Entry::Occupied(entry) => {
|
||||
if mode != *entry.get() {
|
||||
return Err(Error::DuplicateExecutableFileHeader {
|
||||
path: relpath.clone(),
|
||||
});
|
||||
if !skip_validation {
|
||||
return Err(Error::DuplicateExecutableFileHeader {
|
||||
path: relpath.clone(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue