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

Handle the case where --netrc-file isn't a file on disk #15248

Closed
P-E-Meunier opened this issue Oct 10, 2024 · 0 comments
Closed

Handle the case where --netrc-file isn't a file on disk #15248

P-E-Meunier opened this issue Oct 10, 2024 · 0 comments
Assignees

Comments

@P-E-Meunier
Copy link

I did this

curl -L --netrc-file <(cat /tmp/netrc) https://some-url.com, where https://some-url.com redirects me to https://other-host.com.

I expected the following

I expected the credentials from my netrc file to be used on https://other-host.com, but they were not.

My understanding is that libcurl expects netrc files to be actual files that can be read multiple times, which may not be the case. An actual use case for this is a GPG-encrypted netrc file, in the same format Git uses.

curl/libcurl version

commit 436bbbe (latest on master today)

operating system

Linux pem 6.6.52 #1-NixOS SMP Wed Sep 18 17:24:10 UTC 2024 aarch64 GNU/Linux

@bagder bagder self-assigned this Oct 10, 2024
bagder added a commit that referenced this issue Oct 10, 2024
So that on redirects etc it does not reread the file but just parses it
again.

Reported-by: Pierre-Etienne Meunier
Fixes #15248
bagder added a commit that referenced this issue Oct 11, 2024
So that on redirects etc it does not reread the file but just parses it
again.

Reported-by: Pierre-Etienne Meunier
Fixes #15248
@bagder bagder closed this as completed in 3b43a05 Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants