-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
curl CLI v8.11.1 fails to offer HTTP Basic auth specified in .netrc when invoked with --netrc-optional #15767
Labels
Comments
I can reproduce in a new curl test case. |
Is this a regression, do you know? |
bagder
added a commit
that referenced
this issue
Dec 17, 2024
When a specific hostname matched, and only a password is set before another machine is specified in the netrc file, the parser would not be happy and stop there and return the password-only state. It instead continued and did not return a match. Added test 2005 to verify this case Reported-by: Ben Zanin Fixes #15767
I do believe it is a regression, yes: |
I just checked. I broke this in e9b9bba. It worked fine in 8.11.0. |
mrkline
added a commit
to mrkline/nixos-config
that referenced
this issue
Jan 21, 2025
And I must scream: curl/curl#15767
This was referenced Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
Given an executable test script with the following contents named
test-curl
which will ruthlessly shove aside any existing~/.netrc
file..:...then invoking this script with
case='pass' ./test-curl
replicates the expected and desired behaviour, whereas invoking it withcase='fail' ./test-curl
replicates the failure case.I expected the following
Desired outcome with
case='pass'
, with theAuthorization: Basic ...
header being sent with the HTTP request:Surprising outcome with
case='fail'
, with theAuthorization: Basic ...
header absent from the HTTP request:curl/libcurl version
curl 8.11.1 (aarch64-apple-darwin23.6.0) libcurl/8.11.1 OpenSSL/3.4.0 (SecureTransport) zlib/1.2.12 brotli/1.1.0 zstd/1.5.6 AppleIDN libssh2/1.11.1 nghttp2/1.64.0 librtmp/2.3
Release-Date: 2024-12-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
operating system
Darwin P2XYX6PHVX 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:39 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6000 arm64 arm Darwin
The text was updated successfully, but these errors were encountered: