You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import docs: the password is said to go to the origins the source's documents name, but the code sends it to the source's origin only #800
docs/import.md:354-357 says the source's password is "sent only to the source's origin and the origins its documents name (a feed's package base address, a registry's token service)".
The code sends it to fewer places:
Feed::auth scopes the credentials to the service index's origin (crates/server/src/import/feed.rs:15-18, :107-118);
send_hops attaches them only to a hop on that origin (crates/core/src/net/upstream.rs:697-707);
npm and raw imports use the import URL's origin only.
Only a registry's token realm gets them on another origin.
Scenario
A NuGet feed's service index lists its PackageBaseAddress on another host that needs authentication. Following the docs, the administrator expects the import's credentials to go there. Instead every version list fails with "the source refused the credentials (401)", though none were sent. The docs also overstate where a secret goes, for anyone auditing its exposure.
Expected
The docs say what the code does: the source's origin, plus a registry's token realm. Keep the code, which is the safer behaviour.
Activity