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

ftp: fail to retrieve password from .netrc when user is in URL #3869

Closed
mc-butler opened this issue Oct 10, 2017 · 5 comments
Closed

ftp: fail to retrieve password from .netrc when user is in URL #3869

mc-butler opened this issue Oct 10, 2017 · 5 comments
Assignees
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3869
Reporter cri (cri@….org)

I have a proper entry in ~/.netrc for USERNAME, PASSWORD and HOST.

If I try to access the URL ftp://HOST/PATH, mc correctly retrieves USERNAME and PASSWORD from .netrc and I can log into the FTP host.

If I try to access the URL ftp://USERNAME@HOST/PATH, mc displays a popup window, asking for the password. Shouldn't it retrieve the password from .netrc?

I had a look at https://midnight-commander.org/browser/src/vfs/ftpfs/ftpfs.c#L371

shouldn't it be

...`&& path_element->password == NULL`

instead of

...`&& path_element->password != NULL`

?

Or am I missing something?

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 14, 2017 at 6:20 UTC (comment 1)

  • Branch state changed from no branch to on review
  • Owner set to andrew_b
  • Status changed from new to accepted
  • Component changed from mc-core to mc-vfs
  • Description edited
  • Milestone changed from Future Releases to 4.8.20

Please test the
branch: 3869_netrc_password
Initial [54171970084732fe808e0cc200ffc112ee4f8ee1]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 29, 2017 at 17:21 UTC (comment 2)

  • Votes set to andrew_b
  • Branch state changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 29, 2017 at 17:24 UTC (comment 3)

  • Resolution set to fixed
  • Votes changed from andrew_b to committed-master
  • Status changed from accepted to testing
  • Branch state changed from approved to merged

Merged to master: [cde8e19].

git log --pretty=oneline 0d17cf7..cde8e19

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 29, 2017 at 17:25 UTC (comment 4)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by cri (cri@….org) on Sep 13, 2019 at 21:48 UTC (comment 5)

It seems to me this bug has re-surfaced on 4.8.22 (Debian buster): i.e. mc keeps asking me for the user's password even when there's a proper password in .netrc.
Moreover, if I don't provide neither user nor password (​ftp://HOST/PATH), mc tries anonymous FTP, whereas before it used the credentials from .netrc.

Sorry I can't test 4.8.23 at the moment, but it worked fine at least until 4.8.18 (Debian stretch), so maybe some regression has happened somewhere in between 4.8.18 and 4.8.22?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress
Development

No branches or pull requests

2 participants