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 reports "fault filter abortcurl: (6) Could not resolve host: store.example.xn--com-9o0a" #13214
Comments
The |
This case is really a matter of "garbage in, garbage out". It is difficult for curl to know when the garbage input is intended or not. |
... in the option argument. Typically this is a mistake done when copying example command lines from online documentation using the wrong quote character. Presumably there are also other potential quote characters that might be used, and this check is done without even knowing that unicode is used! Reported-by: Sanjay Pujare Fixes #13214
I understand. Thanks for fixing it. One more thing that confused me. With the bad unicode
But with the right quote character(s):
The 401 Unauthorized is expected in the second example. But the questions are:
|
Since they were the wrong quote characters, the shell treats the argument as
two: “host: and store.example.com”. curl then sets a header "“host: " and
tries to connect to the URL http://store.example.com” which it
converts to punycode store.example.xn--com-9o0a
|
... in the option argument. Typically this is a mistake done when copying example command lines from online documentation using the wrong quote character. Presumably there are also other potential quote characters that might be used, and this check is done without even knowing that unicode is used! Reported-by: Sanjay Pujare Fixes #13214
I did this
From a Google doc I copy-pasted a curl command that was:
Note that what appear as double-quotes around
host: store.example.com
are not the normal double-quotes used in computing but used in Document editing programs like GoogleDoc or Word. But this trips up curl and it gives me the following output:I spent considerable amount of time trying to troubleshoot this since the error message was very misleading
I expected the following
curl should probably recognize the unsupported characters on the command line and generate a message while parsing those arguments instead of generating an error deep inside (which is what "fault filter abort" looks like)
curl/libcurl version
curl 7.88.1 (x86_64-pc-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.11 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3 OpenLDAP/2.5.13
Release-Date: 2023-02-20, security patched: 7.88.1-10+deb12u5
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
operating system
Linux xxxxx 6.1.0-18-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: