Skip to content
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

Hide password in the index printed via --emit-index-annotation #3112

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

ChannyClaus
Copy link
Contributor

@ChannyClaus ChannyClaus commented Apr 18, 2024

Summary

resolves #3106

Test Plan

added a simple test where the password provided in UV_INDEX_URL is hidden in the output as expected.

// Hide the password.
let _ = url.set_password(Some("****"));
}
writeln!(f, "{}", format!(" # from {url}").green())?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should just omit the username and password entirely -- what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, that is cleaner. making the changes -

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved it out to a method. Thanks!

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@charliermarsh charliermarsh changed the title hide password in the index printed via --emit-index-annotation Hide password in the index printed via --emit-index-annotation Apr 18, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Apr 18, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) April 18, 2024 03:55
@charliermarsh charliermarsh merged commit 8c7d0a3 into astral-sh:main Apr 18, 2024
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--emit-index-annotation should redact usernames and passwords in index URL
2 participants