uv/crates/uv-fs
Charlie Marsh c43757ad4c
Avoid calling normalize_path with relative paths that extend beyond the current directory (#3013)
## Summary

It turns out that `normalize_path` (sourced from Cargo) has a subtle
bug. If you pass it a relative path that traverses beyond the root, it
silently drops components. So, e.g., passing `../foo/bar`, it will just
drop the leading `..` and return `foo/bar`.

This PR encodes that behavior as a `Result` and avoids using it in such
cases.

Closes https://github.com/astral-sh/uv/issues/3012.
2024-04-12 14:48:03 -04:00
..
src Avoid calling normalize_path with relative paths that extend beyond the current directory (#3013) 2024-04-12 14:48:03 -04:00
Cargo.toml Avoid calling normalize_path with relative paths that extend beyond the current directory (#3013) 2024-04-12 14:48:03 -04:00