deno
c026afeb - fix(npmrc): match auth configs by authority and path (#36359)

Commit
62 days ago
fix(npmrc): match auth configs by authority and path (#36359) Auth config lookup treated configured host and path keys as arbitrary string prefixes. This could select the wrong config for a similarly named host, a different port, or a sibling path with the same prefix. Compare scheme-relative keys against the URL's complete authority and path-segment boundaries while retaining longest-path selection. This preserves scheme-independent npmrc keys, default-port normalization, root and nested config behavior, and the existing package-registry fallback. Tests: - `cargo test -p deno_npmrc -- --nocapture` - `cargo check -p deno_npmrc --all-targets` - `cargo clippy -p deno_npmrc --all-targets -- -D warnings`
Author
Parents
Loading