| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes https://github.com/curl/curl/pull/6920
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the host name in a URL is given as an IPv4 numerical address, the
address can be specified with dotted numericals in four different ways:
a32, a.b24, a.b.c16 or a.b.c.d and each part can be specified in
decimal, octal (0-prefixed) or hexadecimal (0x-prefixed).
Instead of passing on the name as-is and leaving the handling to the
underlying name functions, which made them not work with c-ares but work
with getaddrinfo, this change now makes the curl URL API itself detect
and "normalize" host names specified as IPv4 numericals.
The WHATWG URL Spec says this is an okay way to specify a host name in a
URL. RFC 3896 does not allow them, but curl didn't prevent them before
and it seems other RFC 3896-using tools have not either. Host names used
like this are widely supported by other tools as well due to the
handling being done by getaddrinfo and friends.
I decided to add the functionality into the URL API itself so that all
users of these functions get the benefits, when for example wanting to
compare two URLs. Also, it makes curl built to use c-ares now support
them as well and make curl builds more consistent.
The normalization makes HTTPS and virtual hosted HTTP work fine even
when curl gets the address specified using one of the "obscure" formats.
Test 1560 is extended to verify.
Fixes #6863
Closes #6871
|
|
|
|
|
|
|
|
|
|
| |
... by fixing macros to do-while constructs and moving out the calls to
"break" outside of the actual macro. It also fixes the problem where the
macro was used witin a loop and the break didn't do right.
Reported-by: Emil Engler
Fixes #6847
Closes #6909
|
|
|
|
|
|
| |
No longer considered experimental.
Closes #6700
|
|
|
|
|
|
|
|
|
| |
... previously they were supported if a TLS library would (unexpectedly)
still support them, but from this change they will be refused already in
curl_easy_setopt(). SSLv2 and SSLv3 have been known to be insecure for
many years now.
Closes #6773
|
|
|
|
| |
Closes #6901
|
|
|
|
|
|
| |
Pointed out by scan-build
Closes #6900
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code in cr_recv was returning prematurely as soon as the socket
reported no more data to read. However, this could be leaving some
unread plaintext data in the rustls session from a previous call,
causing causing the transfer to hang if the socket never receives
further data.
We need to ensure that the session is fully drained of plaintext data
before returning CURLE_AGAIN to the caller.
Reviewed-by: Jacob Hoffman-Andrews
Closes #6894
|
|
|
|
|
|
|
|
|
| |
Add test 676 to verify that setting CURLOPT_COOKIEFILE to NULL again clears
the cookiejar from memory.
Reported-by: Stefan Karpinski
Fixes #6889
Closes #6891
|
|
|
|
|
| |
Fixes #6864
Cloes #6886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to Microsoft document MS-NLMP, current flags usage is not
accurate: flag NTLMFLAG_NEGOTIATE_NTLM2_KEY controls the use of
extended security in an NTLM authentication message and NTLM version 2
cannot be negotiated within the protocol.
The solution implemented here is: if the extended security flag is set,
prefer using NTLM version 2 (as a server featuring extended security
should also support version 2). If version 2 has been disabled at
compile time, use extended security.
Tests involving NTLM are adjusted to this new behavior.
Fixes #6813
Closes #6849
|
|
|
|
| |
Closes #6849
|
|
|
|
|
|
|
| |
... as !defined(CURL_DISABLE_CRYPTO_AUTH) is a prerequisite for the
whole NTLM.
Closes #6849
|
|
|
|
| |
Closes #6867
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 2682e5f5, several instances of AC_HEADER_TIME were removed since
it is a deprecated autoconf macro. However, this was the macro that
defined TIME_WITH_SYS_TIME, which was used to indicate that <time.h>
can be included alongside <sys/time.h>. TIME_WITH_SYS_TIME is still
used in the configure test body and since it is no longer defined,
<time.h> is *not* included on systems that have <sys/time.h>.
In particular, at least on musl libc and glibc, <sys/time.h> does
not implicitly include <time.h> and does not declare clock_gettime,
gmtime_r, or localtime_r. This causes configure to fail to detect
those functions.
The AC_HEADER_TIME macro deprecation text says
> All current systems provide time.h; it need not be checked for.
> Not all systems provide sys/time.h, but those that do, all allow
> you to include it and time.h simultaneously.
So, to fix this issue, simply include <time.h> unconditionally when
testing for time-related functions and in libcurl, and don't bother
checking for it.
Closes #6859
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously defined by the obsolete AC_TYPE_SIGNAL macro,
which was removed in 2682e5f5. The deprecation text says
> Your code may safely assume C89 semantics that RETSIGTYPE is void.
So, remove it and just use void instead.
Closes #6861
|
|
|
|
|
|
|
|
| |
... to avoid double-free.
Reported-by: Kenneth Davidson
Fixes #6824
Closes #6856
|
|
|
|
|
|
|
|
| |
This removes the last occurrence of PATH_MAX inside our libssh
implementation by calculating the path length from the string length of
the two components.
Closes #6829
|
|
|
|
|
|
|
|
|
|
| |
... to fix the retry-loop.
Add test 718 to verify.
Reported-by: Daniel Kurečka
Fixes #6828
Closes #6850
|
|
|
|
|
|
|
|
|
| |
instead of 13, before the server has told how many streams it
accepts. The server can always reject new streams anyway if we go above
what it accepts.
Ref: #6826
Closes #6852
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After 957bc1881e686f9714c4e6a01bf33535091f0e21, we no longer compute an
expected_size for directories. This has the upshot that when we compare
even an empty Range with the available size, we fail.
This brings back the previous behaviour, which was to succeed, but with
empty content. This also removes the "Accept-ranges: bytes" header,
which is nonsensical on directories.
Adds test 3016
Fixes #6845
Closes #6846
|
|
|
|
|
|
|
|
|
|
|
| |
for GnuTLS, BearSSL, mbedTLS, NSS, SChannnel, Secure Transport and
wolfSSL...
Regression since 88dd1a8a115b1f5ece (shipped in 7.76.0)
Reported-by: Kenneth Davidson
Reported-by: romamik om github
Fixes #6825
Closes #6827
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Define Curl_resolver_error function only when USE_CURL_ASYNC.
Prior to this change building curl without an asynchronous resolver
backend (c-ares or threaded) and without DoH (DNS-over-HTTPS, which is
also asynchronous but independent of resolver backend) would cause a
build error since Curl_resolver_error is called by and evaluates
variables only available in asynchronous builds.
Reported-by: Benbuck Nason
Fixes https://github.com/curl/curl/issues/6831
Closes https://github.com/curl/curl/pull/6832
|
|
|
|
|
|
| |
Reported-by: Christian Schmitz
Fixes #6816
Closes #6820
|
|
|
|
|
|
|
| |
It was never defined anywhere. Fixed disable-scan (test 1165) to also
scan headers, which found this issue.
Closes #6809
|
|
|
|
|
|
| |
Follow-up to b09c8ee15771c61
Fixes #6812
Closes #6811
|
|
|
|
| |
Closes #6807
|
|
|
|
|
|
|
|
|
| |
To silence (false positive) compiler warnings about it.
Follow-up to 7214288898f5625
Reviewed-by: Marcel Raad
Closes #6810
|
|
|
|
|
|
|
|
|
| |
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890
|
|
|
|
|
|
|
|
| |
Added test 2081 to verify.
CVE-2021-22876
Bug: https://curl.se/docs/CVE-2021-22876.html
|
|
|
|
|
|
| |
... if libgsasl was found.
Closes #6806
|
|
|
|
|
|
| |
Follow-up to a5eee22e594c2460f
Fixes #6804
Closes #6805
|
|
|
|
|
| |
Reviewed-by: Emil Engler
Closes #6802
|
|
|
|
|
| |
... as we know the value cannot be set to negative: enforced by
setopt()
|
|
|
|
|
|
|
|
|
| |
By making sure never to send off more than the allowed number of bytes
per second the speed limit logic is given more room to actually work.
Reported-by: Fabian Keil
Bug: https://curl.se/mail/lib-2021-03/0042.html
Closes #6797
|
|
|
|
|
|
|
|
| |
Both were used for the same purposes and there was no logical separation
between them. Combined, this also saves 16 bytes in less holes in my
test build.
Closes #6798
|
|
|
|
|
|
|
|
| |
SSL_CTX_set_alpn_protos() return 0 on success, and non-0 on failure
Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
Closes #6794
|
|
|
|
|
|
|
|
|
|
| |
Otherwise libcurl is likely to reuse the connection again in the next
attempt since the connection reuse logic doesn't take downgrades into
account.
Reported-by: Anthony Ramine
Fixes #6788
Closes #6793
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, the transfer will be NULL in the trace function when the
early handshake details arrive and then curl won't show them.
Regresssion in 7.75.0
Reported-by: David Hu
Fixes #6783
Closes #6792
|
|
|
|
|
|
|
|
|
| |
Instead of clearing the callback argument in disconnect, set it to the
(new) transfer to make sure the correct data is passed to the callbacks.
Follow-up to e467ea3bd937f38
Assisted-by: Patrick Monnerat
Closes #6787
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the recent conn/data refactor in this source file, this function
was mistakenly still getting the old struct pointer which would lead to
crash on servers with keyboard-interactive auth enabled.
Follow-up to a304051620b92e12b (shipped in 7.75.0)
Reported-by: Christian Schmitz
Fixes #6691
Closes #6782
|
|
|
|
|
|
| |
Follow-up to d3d90ad9c00530d
Closes #6781
|
|
|
|
|
|
|
| |
Follow-up to a59c33ceffb8f78
Reported-by: Patrick Monnerat
Fixes #6676
Closes #6780
|
|
|
|
|
|
|
|
|
|
| |
To make sure the Host: header and the URL provide the same authority
portion when sent to the proxy, strip the default port number from the
URL if one was provided.
Reported-by: Michael Brown
Fixes #6769
Closes #6778
|
|
|
|
|
|
|
|
| |
... it was never meant to be there.
Reported-by: Tomas Berger
Fixes #6774
Closes #6776
|
|
|
|
| |
Closes #6770
|
|
|
|
|
|
|
|
|
| |
If libssh2_knownhost_init() returns NULL, like in an OOM situation, the
ssh session was freed but the pointer wasn't cleared which made libcurl
later call libssh2 to cleanup using the stale pointer.
Fixes #6764
Closes #6766
|
|
|
|
|
|
|
|
| |
If we get a close_notify, treat that as EOF. If we get an EOF from the
TCP stream, treat that as an error (because we should have ended the
connection earlier, when we got a close_notify).
Closes #6763
|
|
|
|
|
|
|
|
|
|
|
| |
- Document in DOH that some SSL settings are inherited but DOH hostname
and peer verification are not and are controlled separately.
- Document that CURLOPT_SSL_CTX_FUNCTION is inherited by DOH handles but
we're considering changing behavior to no longer inherit it. Request
feedback.
Closes https://github.com/curl/curl/pull/6688
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When asked to resume a download, libcurl will convert that to HTTP logic
and if then the entire file is already transferred it will result in a
416 response from the HTTP server. With CURLOPT_FAILONERRROR set in that
scenario, it should *not* lead to an error return.
Updated test 1156, added test 1273
Reported-by: Jonathan Watt
Fixes #6740
Closes #6753
|