-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL decode passwords for storage #2947
Conversation
username: urlencoding::decode(url.username()) | ||
.expect("An encoded username should always decode") | ||
.into_owned(), | ||
password: url.password().map(str::to_string), | ||
password: url.password().map(|password| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url.password()
is explicitly a percent-encoded string so this makes a lot of sense to me.
I think the problem is roughly that we use uv/crates/uv-auth/src/store.rs Lines 47 to 55 in 43ded54
but those percent-encode the credentials which are already be percent-encoded since we pulled from from I want to make some changes to the documentation and structs here to clarify this. |
Implemented in #2976 |
Closes - #2822 - #2563 (via #2984) Partially address: - #2465 - #2464 Supersedes: - #2947 - #2570 (via #2984) Some significant refactors to the whole `uv-auth` crate: - Improving the API - Adding test coverage - Fixing handling of URL-encoded passwords - Fixing keyring authentication - Updated middleware (see #2984 for more)
Closes #2822
Same idea as #2592
Needs a test plan still.