Daniel Stenberg [Sat, 2 May 2026 20:50:10 +0000 (22:50 +0200)]
lib: drop support for CURLAUTH_DIGEST_IE
This bit was used to do Digest authentication like Internet Explorer
before version 7 (released on October 18, 2006). Presumably no one uses
this anymore and since it is hard to use and does broken auth, starting
in 8.21.0 this bit does nothing (except setting the actual Digest bit).
Kai Pastor [Fri, 8 May 2026 15:21:52 +0000 (17:21 +0200)]
cmake: fix zstd CMake config name
They install `zstdConfig.cmake`,
https://github.com/facebook/zstd/blob/885c79ba4ae8345e006f61bc97b270d4cf7ff076/build/cmake/CMakeModules/ZstdPackage.cmake#L33-L38.
With the `Config.cmake` pattern, this is a case-sensitive package name,
`zstd`.
When detecting these dependencies via CMake Config and their main
imported target is undefined, automatically assume and use their static
imported target instead.
Adopting from vcpkg downstream, where it's done for nghttp3 and ngtcp2,
but not for nghttp2.
Daniel Stenberg [Thu, 7 May 2026 15:45:48 +0000 (17:45 +0200)]
tool_urlglob: avoid overflow at end of range
Due to how the range span globbing code works, a range that ends with 9223372036854775807 (the maximum signed 63 bit value) cannot be used as
it triggers an integer overflow.
Stefan Eissing [Thu, 7 May 2026 08:30:07 +0000 (10:30 +0200)]
url: fix connection reuse for starttls protocols
When a connection is tested for reuse in a transfer that *may* upgrade
to TLS (commonly via STARTTLS), the SSL configuration must match the
existing connection.
Stefan Eissing [Wed, 6 May 2026 11:44:16 +0000 (13:44 +0200)]
auth: cleanups
- rename `req->proxyuserpwd` to `req->hd_proxy_auth`
- rename `req->userpwd` to `req->hd_auth`
- rename parameter `proxytunnel` to `is_connect` for Curl_http_output_auth()
- move path+query concatenation into Curl_http_output_auth(), saving an alloc when no auth is in play
- rename `H1_HD_USER_AUTH` into `H1_HD_AUTH`
Daniel Stenberg [Thu, 7 May 2026 07:04:55 +0000 (09:04 +0200)]
url: remove ssh_config_matches
The CURLOPT_SSH_HOST_PUBLIC_KEY_* options are documented to verify the
host at connect time and not for connection reuse. Once the SSH host has
been deemed okay, it remains okay as long as the connection survives.
In addition: this function currently always returned TRUE since the
pointers have been NULLed in the SSH backend code before this function
is called.
parasol-aser [Thu, 7 May 2026 03:53:34 +0000 (03:53 +0000)]
tool1622: assert width and exact format boundaries
Convert the silent "was too long!" diagnostics in the timebuf and
max5data width loops into fail_unless assertions, so a regression in
output width fails the unit test directly instead of only printing.
Add small exact-output tables that probe format-transition boundaries
not necessarily hit by the geometric value sweep: the 99999/100000
suffix kick-in for max5data, and the 6d/01h, 51m, 136y, and >99999y roll
points for timebuf.
Daniel Stenberg [Wed, 6 May 2026 21:59:22 +0000 (23:59 +0200)]
mbedtls: null terminate the private key blob
Unfortunately, mbedtls_pk_parse_key() requires the data to be
null-terminated if the data is PEM encoded (even when provided the exact
length), so this function needs to make a copy that has one.
Stefan Eissing [Tue, 5 May 2026 10:58:22 +0000 (12:58 +0200)]
lib: introduce Curl_peer
`struct Curl_peer` keeps information about a communication endpoint
together. It will replace `conn->host` and `conn->conn_to_host` and
proxyinfo host. It will also become part of `struct ssl_peer`.
It has a reference counter, so an instance can be shared between
connections and filters.
Elminiates `conn->host` and `conn->connect_to_host`, used in the
proxyinfo structures. Passed to DNS resolution and socks filters, etc.
Pass peer to http proxy and socks tunnel filters. Use peer in dns filter
and resolving. Make `Curl_peer` a member in the `struct ssl_peer`.
Daniel Stenberg [Mon, 4 May 2026 08:28:10 +0000 (10:28 +0200)]
tool_formparse: cleanups
- explain the get_param_part() function
- make it parse only blanks like the rest of this code
- check for commas explicitly when scanning multiple files (to help code
understanding)
dependabot[bot] [Fri, 1 May 2026 17:50:42 +0000 (17:50 +0000)]
GHA: bump actions and pips
- update action `actions/cache` from 5.0.4 to 5.0.5
- update action `actions/upload-artifact` from 7.0.0 to 7.0.1
- update action `github/codeql-action` from 4.32.4 to 4.35.2
- update action `msys2/setup-msys2` from 2.31.0 to 2.31.1
- update pip `filelock` from 3.25.2 to 3.29.0
- update pip `impacket` to 0.13.0
- update pip `ruff` from 0.15.10 to 0.15.12
Viktor Szakats [Wed, 29 Apr 2026 13:27:37 +0000 (15:27 +0200)]
tidy-up: miscellaneous
- sha256: fix backend priority in comment.
- URLs: link to IETF URLs to the HTML document, to match others.
- VERSIONS.md: use unified date format for recent entries too.
Ref: https://github.com/curl/curl-www/commit/ce5d32032f8d3d8601f3ef022bbca485020d1bb9
- GHA/labeler.yml: alpha-sort file masks in a label block.
- tests/server/mqttd: fix call arg list in a disabled function.
- tests/server/mqttd: fix comment.
Viktor Szakats [Thu, 30 Apr 2026 14:06:35 +0000 (16:06 +0200)]
GHA/curl-for-win: switch riscv job to debian:stable (testing broke)
```
The following packages have unmet dependencies:
[...]
E: Unable to satisfy dependencies. Reached two conflicting assignments:
1. musl-dev:amd64=1.2.5-3+b1 is selected for install
2. musl-dev:amd64 is not selected for install because:
1. musl-dev:riscv64=1.2.5-3 is selected for install
2. musl-dev:amd64 Breaks musl-dev:riscv64 (!= 1.2.5-3+b1)
```
Ref: https://github.com/curl/curl/actions/runs/25168601672/job/73785600341#step:3:154
Raymond Steen [Wed, 29 Apr 2026 07:27:39 +0000 (10:27 +0300)]
mqtt: validate PINGRESP and DISCONNECT have remaining_length == 0
Per MQTT 3.1.1 sections 3.13.1 and 3.14.1, PINGRESP and DISCONNECT fixed
headers must have remaining_length set to zero. The previous code
dispatched to mqtt->nextstate based on the queued state alone without
validating remaining_length for these no-payload packet types, allowing
a malicious broker to send a PINGRESP with non-zero remaining_length
whose trailing bytes would be interpreted as the payload of whatever
message type was queued (CONNACK, SUBACK, etc.).
The exploitation path turned out to be narrow — curl sends data to the
server the user chose to talk to — but the spec violation and the
resulting protocol-state error are real. Reject the malformed packets
with CURLE_WEIRD_SERVER_REPLY before state dispatch.
Reported-by: Raymond Steen <raymond@vortiqxconsilium.com>
Found by VORTIQ-X VXF Framework
Bug: https://hackerone.com/reports/3702718
Signed-off-by: Raymond Steen <raymond@vortiqxconsilium.com>
Closes #21465
Viktor Szakats [Wed, 29 Apr 2026 19:51:43 +0000 (21:51 +0200)]
GHA/linux: work around Linuxbrew install failure
Root cause unknown, it appeared today without any local change:
```
==> Installing dependencies for libssh2: openssl@3 and zlib-ng-compat
==> Installing libssh2 dependency: openssl@3
==> Pouring openssl@3--3.6.2.x86_64_linux.bottle.tar.gz
Error: A `brew install openssl@4 libssh2 libngtcp2 libnghttp3 c-ares` process has already locked /home/linuxbrew/.linuxbrew/Cellar/openssl@4.
Please wait for it to finish or terminate it to continue.
Error: Process completed with exit code 1.
```
Ref: https://github.com/curl/curl/actions/runs/25129061781/job/73650161844?pr=21468#step:2:407
Last known good run: https://github.com/curl/curl/actions/runs/25038989485/job/73337289504
Viktor Szakats [Sat, 25 Apr 2026 10:59:55 +0000 (12:59 +0200)]
tidy-up: git options, ECH, HTTP/3 documentation
- prefer `--branch` over `-b`, where missing.
- add `--depth 1` where missing.
- sync option order between docs and GHA.
- bump quiche and rustls-ffi versions in documentation.
- ECH.md: update for OpenSSL 4.
Viktor Szakats [Fri, 24 Apr 2026 11:31:53 +0000 (13:31 +0200)]
sshserver.pl: add option to enable KEX algorithms in sshd
Necessary when the libssh2/libssh client library does not support KEX
algos offered by default by the OpenSSH server. E.g. libssh2 with WinCNG
combined with OpenSSH 10+.
Daniel Stenberg [Fri, 24 Apr 2026 14:27:34 +0000 (16:27 +0200)]
mbedtls: cleanup more without care for 'initialized'
Several mbedTLS resources (entropy/CTR-DRBG, CA/client certs, keys, CRL)
are initialized and may allocate memory before initialized is set, and
must still be cleaned up.