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

netrc: Use the password from lines without login #9248

Closed
wants to merge 1 commit into from

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Aug 4, 2022

If netrc entry has password with empty login, use it for any username.

Example:
.netrc:
machine example.com password 123456

curl -vn http://user@example.com/

Fix it by initializing state_our_login to TRUE, and reset it only when
finding an entry with the same host and different login.

If netrc entry has password with empty login, use it for any username.

Example:
.netrc:
machine example.com password 123456

curl -vn http://user@example.com/

Fix it by initializing state_our_login to TRUE, and reset it only when
finding an entry with the same host and different login.
@orgads
Copy link
Contributor Author

orgads commented Aug 4, 2022

I'm not sure how to add tests for this.

orgads added a commit to orgads/curl that referenced this pull request Aug 5, 2022
orgads added a commit to orgads/curl that referenced this pull request Aug 5, 2022
@emilengler
Copy link
Contributor

I'm personally a bit in doubt of this feature, because it implicates that a default user password is a usable approach, whereas in reality, this is a security nightmare.

orgads added a commit to orgads/curl that referenced this pull request Aug 8, 2022
orgads added a commit to orgads/curl that referenced this pull request Aug 18, 2022
@orgads orgads mentioned this pull request Aug 18, 2022
@bagder bagder closed this in 943fb2b Aug 29, 2022
bagder pushed a commit that referenced this pull request Aug 29, 2022
@orgads orgads deleted the netrc-no-login branch August 29, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants