]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 months agocreds: hold credentials
Stefan Eissing [Mon, 11 May 2026 12:25:52 +0000 (14:25 +0200)] 
creds: hold credentials

Authorizdation credentials are kept in `struct Curl_creds`. This contains:

* `user`: the username, maybe the empty string
* `passwd`: the password, maybe the empty string
* `sasl_authzid`: the SASL authz value, maybe the empty string
* `oauth_bearer`: the OAUTH bearer token, maybe the empty string
* `source`: where the credentials from from
* `refcount`: a reference counter to link/unkink creds

A `creds` with all values empty is equivalent to NULL, e.g. no `creds`
instance. With reference counting, `creds` can be linked/unlinked
in several places.

See docs/internals/CREDENTIALS.md for use.

Closes #21548

2 months agoGHA: (re-)enable SMB in a few builds
Daniel Stenberg [Tue, 12 May 2026 10:49:30 +0000 (12:49 +0200)] 
GHA: (re-)enable SMB in a few builds

Closes #21564

2 months agocurl_ntlm_core: fix nettle 4+ builds in certain MultiSSL combos
Viktor Szakats [Tue, 12 May 2026 11:42:12 +0000 (13:42 +0200)] 
curl_ntlm_core: fix nettle 4+ builds in certain MultiSSL combos

Also rename macro to resemble other backends.

Reported by Codex Security

Fixes #21562
Follow-up to 01f08dc4eb20a19aa60230653715c8b839619cbb #21557

Closes #21566

2 months agortsp: bump buf after rtsp_filter_rtp()
Daniel Stenberg [Tue, 12 May 2026 09:56:16 +0000 (11:56 +0200)] 
rtsp: bump buf after rtsp_filter_rtp()

Reported-by: Andrew Nesbit
Closes #21563

2 months agospnego_sspi: honor CURLOPT_GSSAPI_DELEGATION for Windows SSPI
Song X. Gao [Mon, 11 May 2026 16:45:15 +0000 (12:45 -0400)] 
spnego_sspi: honor CURLOPT_GSSAPI_DELEGATION for Windows SSPI

Make CURLOPT_GSSAPI_DELEGATION effective on Windows builds that use SSPI
(instead of a native GSS-API implementation), so Kerberos delegation can
be requested during SPNEGO/Negotiate authentication.

Closes #21528

2 months agotftp: stricter option name checks
Daniel Stenberg [Tue, 12 May 2026 07:20:31 +0000 (09:20 +0200)] 
tftp: stricter option name checks

Previously, the use of checkprefix() alone allowed the code to match not
only on "blksize" but also (mistakenly) on "blksizeFOO" etc.

Reported-by: Andrew Nesbit
Closes #21560

2 months agotool_urlglob: make globbing error reported for correct position
Daniel Stenberg [Tue, 12 May 2026 08:03:02 +0000 (10:03 +0200)] 
tool_urlglob: make globbing error reported for correct position

Reported by Codex Security

Closes #21561

2 months agotool_urlglob: add named globs
Daniel Stenberg [Wed, 22 Apr 2026 09:38:02 +0000 (11:38 +0200)] 
tool_urlglob: add named globs

Idea-by: Bastian Jesuiter
Verified by test 2408 - 2411

Closes #21409

2 months agoevent: fix wakeup consumption
Stefan Eissing [Mon, 11 May 2026 12:56:04 +0000 (14:56 +0200)] 
event: fix wakeup consumption

The events on a multi wakeup socketpair were only consumed via
curl_multi_poll()/curl_multi_wait() but not in event based processing on
a curl_multi_socket() call. That led to busy loops as reported in

Fixes #21547
Reported-by: Earnestly on github
Closes #21549

2 months agognutls: fix more nettle 4+ compatibility issues
Viktor Szakats [Tue, 12 May 2026 02:50:09 +0000 (04:50 +0200)] 
gnutls: fix more nettle 4+ compatibility issues

- disable DES with nettle 4. It no longer supports it.
  ```
  lib/curl_ntlm_core.c:67:12: fatal error: 'nettle/des.h' file not found
     67 | #  include <nettle/des.h>
        |            ^~~~~~~~~~~~~~
  ```

- fix MD4 support with nettle 4.
  ```
  lib/md4.c:178:36: error: too many arguments to function call, expected 2, have 3
    178 |   md4_digest(ctx, MD4_DIGEST_SIZE, digest);
        |   ~~~~~~~~~~                       ^~~~~~
  ```

- fix unused argument compiler warning:
  ```
  lib/vtls/gtls.c:2267:39: error: unused parameter 'sha256len' [clang-diagnostic-unused-parameter,-warnings-as-errors]
  2267 |                                size_t sha256len)
       |                                       ^
  ```
  Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970143?pr=21557

- GHA/macos: stop enabling NTLM in the GnuTLS job.
  It no longer builds due to missing DES support in nettle 4.
  ```
  lib/curl_ntlm_core.c:90:4: error: "cannot compile NTLM support without a crypto library with DES."
     90 | #  error "cannot compile NTLM support without a crypto library with DES."
        |    ^
  ```
  Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970170?pr=21557

Follow-up to cfadbaa133504d47ece989486fde944d076e0222 #21169

Closes #21557

2 months agoGHA/linux: build local wolfSSL opensslextra with `--enable-ed25519`
Viktor Szakats [Tue, 12 May 2026 02:02:36 +0000 (04:02 +0200)] 
GHA/linux: build local wolfSSL opensslextra with `--enable-ed25519`

For use with RFC 9421 HTTP Message Signatures support.

Ref: https://github.com/curl/curl/pull/21239/files#r3222322908
Ref: #21239

Closes #21555

2 months agognutls: allow building with nettle 4.0
Xi Ruoyao [Thu, 30 Apr 2026 14:53:20 +0000 (22:53 +0800)] 
gnutls: allow building with nettle 4.0

Closes #21169

2 months agodocs: fix --follow doc typo
Tim Martin [Mon, 11 May 2026 20:06:57 +0000 (15:06 -0500)] 
docs: fix --follow doc typo

Let the singular ~~object~~ subject "option" agree with the verb "set".

Closes #21553

2 months agodelta: harden external command invocations
Viktor Szakats [Wed, 18 Mar 2026 12:24:07 +0000 (13:24 +0100)] 
delta: harden external command invocations

By moving operations Perl-native (from shell and external commands), and
passing arguments individually to external commands.

Pointed out by Codex Security

Closes #21104

2 months agocmake: export/forward `NGTCP2_CRYPTO_BACKEND`
Kai Pastor [Sat, 9 May 2026 05:23:37 +0000 (07:23 +0200)] 
cmake: export/forward `NGTCP2_CRYPTO_BACKEND`

Exporting the component name as passed in is somewhat boring. OTOH it is
convenient for reuse.

- FindNGTCP2: export crypto backend in `NGTCP2_CRYPTO_BACKEND`.
- pass `COMPONENTS` `NGTCP2_CRYPTO_BACKEND` in `curl-config.cmake`.
- FindNGTCP2: fix to skip Config detection when optional `COMPONENTS` is
  not passed.

Co-authored-by: Viktor Szakats
Reported-by: x-xiang on github
Fixes #21523
Follow-up to 8fce3e17e6cb310cd6dbe38ff14869b8fe5827d2 #20814

Closes #21540

2 months agoidn: replace header guards with forward declaration
Viktor Szakats [Mon, 11 May 2026 08:50:36 +0000 (10:50 +0200)] 
idn: replace header guards with forward declaration

Follow-up to bc40e09f63889a8bc14fa8f7221921eb5b4a559e #21472

Closes #21551

2 months agohostip: remove unused MAX_HOSTCACHE_LEN and MAX_DNS_CACHE_SIZE
amitbidlan [Mon, 11 May 2026 13:39:53 +0000 (22:39 +0900)] 
hostip: remove unused MAX_HOSTCACHE_LEN and MAX_DNS_CACHE_SIZE

These macros are leftovers from when DNS caching was moved out of
hostip.c into its own source file. Both are still defined and used in
lib/dnscache.c; the copies in lib/hostip.c are unreferenced.

Detected with clang -Wunused-macros.

Follow-up to 96d5b5c688
Closes #21550

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 11 May 2026 12:51:03 +0000 (14:51 +0200)] 
RELEASE-NOTES: synced

2 months agolib: drop support for CURLAUTH_DIGEST_IE 21486/head
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).

Closes #21486

2 months agocmake: fix zstd CMake config name
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`.

Follow-up to 8fce3e17e6cb310cd6dbe38ff14869b8fe5827d2 #20814
Closes #21538

2 months agotidy-up: sort TLS backends, distros, alphabetically
Viktor Szakats [Fri, 1 May 2026 11:25:49 +0000 (13:25 +0200)] 
tidy-up: sort TLS backends, distros, alphabetically

Also:
- replace stray [Rr]ustls-ffi with Rustls for consistency.
- add AWS-LC to a couple of lists where missing.

Closes #21481

2 months agocmake: auto-select static nghttp2/nghttp3/ngtcp2 Config
Viktor Szakats [Wed, 29 Apr 2026 17:09:28 +0000 (19:09 +0200)] 
cmake: auto-select static nghttp2/nghttp3/ngtcp2 Config

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.

Refs:
https://github.com/microsoft/vcpkg/blob/773e092a82fc3b4c3e73ee7b049a5e119fa45898/ports/curl/dependencies.patch
https://github.com/microsoft/vcpkg/commit/70b941a5d2443e79eeab62507acb41bd22201277

Downstream-patch-by: Kai Pastor
Closes #21470

2 months agoftp: avoid accessing EPSV response one byte past the NULL
Daniel Stenberg [Sun, 10 May 2026 22:18:53 +0000 (00:18 +0200)] 
ftp: avoid accessing EPSV response one byte past the NULL

If the response is just a single "(".

Reported-by: Andrew Nesbit
Closes #21545

2 months agoGHA: update awslabs/aws-lc to v1.73.0
renovate[bot] [Sun, 10 May 2026 00:33:47 +0000 (00:33 +0000)] 
GHA: update awslabs/aws-lc to v1.73.0

Closes #21542

2 months agoschannel_verify: avoid out of blob access
Daniel Stenberg [Sun, 10 May 2026 13:13:59 +0000 (15:13 +0200)] 
schannel_verify: avoid out of blob access

The code would previously read one byte past the provided
CURLOPT_CAINFO_BLOB if the blob ends exactly with -----BEGIN
CERTIFICATE-----

Reported-by: Andrew Nesbit
Closes #21543

2 months agocookie: simplify strstore(), remove outdated comment
Daniel Stenberg [Sat, 9 May 2026 13:27:11 +0000 (15:27 +0200)] 
cookie: simplify strstore(), remove outdated comment

Closes #21541

2 months agoDockerfile: update debian:bookworm-slim Docker digest to 67b30a6
renovate[bot] [Sat, 9 May 2026 04:45:54 +0000 (04:45 +0000)] 
Dockerfile: update debian:bookworm-slim Docker digest to 67b30a6

Closes #21539

2 months agoGHA: update google/boringssl to v0.20260508.0
renovate[bot] [Fri, 8 May 2026 14:24:33 +0000 (14:24 +0000)] 
GHA: update google/boringssl to v0.20260508.0

Closes #21537

2 months agoCURLOPT_ECH.md: simplify the description language
Daniel Stenberg [Fri, 8 May 2026 11:13:20 +0000 (13:13 +0200)] 
CURLOPT_ECH.md: simplify the description language

It no longer requires "a special build" of OpenSSL, just OpenSSL 4+.

Emphasize the experimental part a little clearer.

Drop the caveat for wolfSSL from the main description.

Closes #21536

2 months agoECH: cleanups
Daniel Stenberg [Thu, 7 May 2026 21:07:54 +0000 (23:07 +0200)] 
ECH: cleanups

- passing an unknown string to CURLOPT_ECH now returns error

  To properly allow applications to spot if they pass in a typo or
  something to libcurl.

- CURLECH_DISABLE is now a plain zero internally, not a dedicated bit which
  simplifies checks for when ECH is enabled

- Dropped the CURLECH_CLA_CFG bit, and just check STRING_ECH_CONFIG

- Turn grease/enable/hard into three different numerical values, no bitmask
  needed

- Convert the struct field 'tls_ech' from an int to a byte.

Closes #21532

2 months agox509asn1: fix operator order in do_pubkey
Daniel Stenberg [Thu, 7 May 2026 21:35:40 +0000 (23:35 +0200)] 
x509asn1: fix operator order in do_pubkey

Check the range before reading data, as it would otherwise read one byte
too many.

Reported-by: Andrew Nesbit
Closes #21533

2 months agotool_urlglob: avoid overflow at end of range
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.

Verified in test 2092

Reported-by: Andrew Nesbit
Closes #21529

2 months agoldap: fix minor leak on write callback error
Daniel Stenberg [Thu, 7 May 2026 16:02:35 +0000 (18:02 +0200)] 
ldap: fix minor leak on write callback error

The 'ber' pointer could remain allocated in the exit path if the write
callback returned error for one of the Curl_client_write() calls.

Reported-by: Andrew Nesbit
Closes #21530

2 months agoftp: simplify ftp_done
Daniel Stenberg [Thu, 7 May 2026 07:44:28 +0000 (09:44 +0200)] 
ftp: simplify ftp_done

Closes #21520

2 months agourl: fix connection reuse for starttls protocols
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.

Reported-by: Andrew Nesbit
Closes #21522

2 months agoftp: remove bits.ftp_use_control_ssl
Stefan Eissing [Thu, 7 May 2026 08:00:10 +0000 (10:00 +0200)] 
ftp: remove bits.ftp_use_control_ssl

It's not needed since we can check the connection for SSL use.

Closes #21521

2 months agoauth: cleanups
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`

Closes #21513

2 months agoftp: remove 2 Curl_resolv_blocking() calls
Stefan Eissing [Wed, 6 May 2026 07:49:14 +0000 (09:49 +0200)] 
ftp: remove 2 Curl_resolv_blocking() calls

They are no longer needed with the new peers and dns filter.
Connection setup will take care of the resoling and connecting.

Closes #21512

2 months agourl: remove ssh_config_matches
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.

Follow-up to c31fcf2decfbf1259cc1f31

Reported-by: Andrew Nesbit
Closes #21519

2 months agoCURLOPT_HAPROXYPROTOCOL.md: only sent for newly setup connections
Daniel Stenberg [Thu, 7 May 2026 06:19:36 +0000 (08:19 +0200)] 
CURLOPT_HAPROXYPROTOCOL.md: only sent for newly setup connections

Closes #21517

2 months agotool_formparse: tool2curlparts is no longer recursive
Daniel Stenberg [Thu, 7 May 2026 06:33:46 +0000 (08:33 +0200)] 
tool_formparse: tool2curlparts is no longer recursive

It could otherwise trigger a stack overflow in extreme cases

Reported-by: Andrew Nesbit
Closes #21518

2 months agotool1622: assert width and exact format boundaries
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.

Closes #21516

2 months agosetopt: gate a few proxy TLS options by checking backend support
Daniel Stenberg [Wed, 6 May 2026 21:40:25 +0000 (23:40 +0200)] 
setopt: gate a few proxy TLS options by checking backend support

The same way the corresponding non-proxy options are checked.

Closes #21514

2 months agombedtls: null terminate the private key blob
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.

Reported-by: Elise Vance
Closes #21515

2 months agotests: fix unit1636 with --disable-progress-meter
Dan Fandrich [Tue, 5 May 2026 03:56:51 +0000 (20:56 -0700)] 
tests: fix unit1636 with --disable-progress-meter

Closes #21500

2 months agopeer: fix compare of hostname for uds
Stefan Eissing [Wed, 6 May 2026 07:24:50 +0000 (09:24 +0200)] 
peer: fix compare of hostname for uds

Unix domain socket paths need to be compared case-senstive, in contrast
to DNS hostnames.

Follow-up to bc40e09f63889a8bc14fa8f7221921

Pointed out by Codex Security

Closes #21511

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 6 May 2026 07:19:12 +0000 (09:19 +0200)] 
RELEASE-NOTES: synced

Also bump pending version to 8.21.0

2 months agotool_formparse: polish error message + make two functions static
Daniel Stenberg [Wed, 6 May 2026 06:50:44 +0000 (08:50 +0200)] 
tool_formparse: polish error message + make two functions static

Closes #21510

2 months agoprotocol: introduce typedef for the do_more() function 21509/head
Daniel Stenberg [Tue, 5 May 2026 16:39:12 +0000 (18:39 +0200)] 
protocol: introduce typedef for the do_more() function

Instead of using magic values -1, 0 and -1 using enum.

Closes #21509

2 months agomulti: make multi_runsingle use sub functions for states
Daniel Stenberg [Tue, 5 May 2026 13:02:32 +0000 (15:02 +0200)] 
multi: make multi_runsingle use sub functions for states

The state machine now calls dedicated sub functions for each state, to
reduce the size and complexity.

Closes #21506

2 months agohostip: convert Curl_resolv_unix to static resolv_unix
Daniel Stenberg [Tue, 5 May 2026 15:09:36 +0000 (17:09 +0200)] 
hostip: convert Curl_resolv_unix to static resolv_unix

It was only used within this file

Closes #21508

2 months agohsts: rename Curl_hsts() to hsts_check() and make it static
Daniel Stenberg [Tue, 5 May 2026 15:01:41 +0000 (17:01 +0200)] 
hsts: rename Curl_hsts() to hsts_check() and make it static

It is no longer used outside of hsts.c

Closes #21507

2 months agoGHA: verify function-lengths
Daniel Stenberg [Mon, 4 May 2026 12:25:47 +0000 (14:25 +0200)] 
GHA: verify function-lengths

No production code function is allowed to be longer than 500 lines.

The lib/setopt.c:setopt_cptr function is currently exempt, as a single
exception until we make it smaller.

Closes #21492

2 months agosocks_gssapi: simplify Curl_SOCKS5_gssapi_negotiate
Daniel Stenberg [Tue, 5 May 2026 09:13:07 +0000 (11:13 +0200)] 
socks_gssapi: simplify Curl_SOCKS5_gssapi_negotiate

Also: pass in NULL when 'conf_state' is not wanted for gss_wrap() and
gss_unwrap()

Closes #21502

2 months agolib: introduce Curl_peer
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`.

Add `docs/internals/PEERS.md` for documentation.

Closes #21472

2 months agothrdqueue.h: minor language polish in comments
Daniel Stenberg [Tue, 5 May 2026 12:34:27 +0000 (14:34 +0200)] 
thrdqueue.h: minor language polish in comments

2 months agothrdqueue.h: forward declare curl_thrdq unconditionally
Daniel Stenberg [Tue, 5 May 2026 09:37:03 +0000 (11:37 +0200)] 
thrdqueue.h: forward declare curl_thrdq unconditionally

This allows the unit tests to have a prototype involving such a struct
pointer - even when the build is done without threaded resolver.

Follow-up to 117d50b4bf48ca04908f87dd665ba

Closes #21503

2 months agotool_formparse.c: use define instead of magic number
Daniel Stenberg [Tue, 5 May 2026 07:20:47 +0000 (09:20 +0200)] 
tool_formparse.c: use define instead of magic number

The longest header lines accepted for the -F option is now a define
instead of a magic number. I also bumped it to be an even 8K.

When fixing, I noticed that for some OOM errors curl would display two
error messages. Also fixed here.

Closes #21501

2 months agothrdqueue: make thrdq_await_done only for unit tests
Daniel Stenberg [Mon, 4 May 2026 21:44:25 +0000 (23:44 +0200)] 
thrdqueue: make thrdq_await_done only for unit tests

It is not used for anything else, so drop Curl_ and make it conditional
accordingly.

Closes #21499

2 months agogtls: fix some typos
Daniel Stenberg [Mon, 4 May 2026 21:33:49 +0000 (23:33 +0200)] 
gtls: fix some typos

Also make gtls_get_ietf_proto() static

Found by Copilot

Closes #21498

2 months agolib: two minor typos
Daniel Stenberg [Mon, 4 May 2026 14:17:11 +0000 (16:17 +0200)] 
lib: two minor typos

Spotted by Copilot

Closes #21496

2 months agoshow-headers.md: mention bold headers and --no-styled-output
Daniel Stenberg [Mon, 4 May 2026 15:19:04 +0000 (17:19 +0200)] 
show-headers.md: mention bold headers and --no-styled-output

Mentioned-by: Sollace on github
Fixes #21495
Closes #21497

2 months agosocks_gssapi: tiny Curl_SOCKS5_gssapi_negotiate cleanups
Daniel Stenberg [Mon, 4 May 2026 10:47:12 +0000 (12:47 +0200)] 
socks_gssapi: tiny Curl_SOCKS5_gssapi_negotiate cleanups

- use 'result' instead of 'code' for CURLcode variable
- use aprintf() instead of malloc + snprintf

Closes #21493

2 months agolibcurl-easy.md: minor clarifications
Daniel Stenberg [Mon, 4 May 2026 09:13:19 +0000 (11:13 +0200)] 
libcurl-easy.md: minor clarifications

Closes #21491

2 months agomime: simplify Curl_mime_prepare_headers
Daniel Stenberg [Mon, 4 May 2026 08:50:50 +0000 (10:50 +0200)] 
mime: simplify Curl_mime_prepare_headers

Make add_content_disposition() a sub function for that single purpose.

Closes #21490

2 months agotool_formparse: cleanups
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)

Closes #21489

2 months agogtls: simplify Curl_gtls_verifyserver
Daniel Stenberg [Mon, 4 May 2026 07:55:26 +0000 (09:55 +0200)] 
gtls: simplify Curl_gtls_verifyserver

Move peer certificate verification logic into gtls_verify_cert()

Closes #21488

2 months agosetopt: changing the proxy port is also a proxy change
Daniel Stenberg [Sat, 2 May 2026 15:18:00 +0000 (17:18 +0200)] 
setopt: changing the proxy port is also a proxy change

Test 1589 verifies.

Closes #21485

2 months agoGHA: bump actions and pips
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

Closes #21483
Closes #21482

3 months agotool_formparse.c: fix two minor comment typos
Daniel Stenberg [Fri, 1 May 2026 09:28:30 +0000 (11:28 +0200)] 
tool_formparse.c: fix two minor comment typos

Pointed out by Copilot

Closes #21480

3 months agourl: simplify parseurlandfillconn
Daniel Stenberg [Fri, 1 May 2026 09:13:27 +0000 (11:13 +0200)] 
url: simplify parseurlandfillconn

Introduce two helper functions:

- hsts_upgrade()
- setup_hostname()

Closes #21479

3 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 1 May 2026 09:34:15 +0000 (11:34 +0200)] 
RELEASE-NOTES: synced

Also bump the curlver to tenative 8.20.1

3 months agoasyn-thrdd: fix result processing without wakeup socketpair
Stefan Eissing [Thu, 30 Apr 2026 14:53:02 +0000 (16:53 +0200)] 
asyn-thrdd: fix result processing without wakeup socketpair

When building curl 8.20.0 with socketpair disabled, there is no
wakeup socket and the resolve results are not processed.

This fix performs result processing in the absence of a wakeup
socket before checking the resolve result.

Closes #21476

3 months agouser-agent.md: mention double quotes too
Daniel Stenberg [Thu, 30 Apr 2026 20:50:27 +0000 (22:50 +0200)] 
user-agent.md: mention double quotes too

Reported-by: Jeremy Nicoll
Bug: https://curl.se/mail/archive-2026-04/0029.html
Closes #21477

3 months agotool_formparse: simplify get_param_part
Daniel Stenberg [Thu, 30 Apr 2026 12:51:47 +0000 (14:51 +0200)] 
tool_formparse: simplify get_param_part

Introduce a few sub functions to reduce complexity

Closes #21478

3 months agotidy-up: miscellaneous
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.

Closes #21473

3 months agoGHA/curl-for-win: switch riscv job to debian:stable (testing broke)
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

Closes #21475

3 months agomqtt: validate PINGRESP and DISCONNECT have remaining_length == 0
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

3 months agoGHA/linux: work around Linuxbrew install failure
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

Ref: 1fbffe7f08f0d551038520b569b817f58084f77b #21379

Closes #21469

3 months agoRELEASE-NOTES: synced curl-8_20_0
Daniel Stenberg [Wed, 29 Apr 2026 05:45:21 +0000 (07:45 +0200)] 
RELEASE-NOTES: synced

curl 8.20.0 release

plus VERSIONS.md update

3 months agoTHANKS: names from the 8.20.0 release
Daniel Stenberg [Wed, 29 Apr 2026 05:45:21 +0000 (07:45 +0200)] 
THANKS: names from the 8.20.0 release

3 months agotidy-up: a cmake warning message and a variable name
Viktor Szakats [Mon, 27 Apr 2026 20:21:27 +0000 (22:21 +0200)] 
tidy-up: a cmake warning message and a variable name

Spotted by GitHub Code Quality

Closes #21462

3 months agobuild: stop building and installing `runtests.1` and `testcurl.1`
Viktor Szakats [Mon, 27 Apr 2026 15:51:16 +0000 (17:51 +0200)] 
build: stop building and installing `runtests.1` and `testcurl.1`

The corresponding tools are never installed, and both are dev tools.
Refer to their `.md` originals instead.

Also markdownify text in lines nearby.

Ref: https://github.com/curl/curl/pull/21460#issuecomment-4328258450

Closes #21461

3 months agocmake: do not install shell completions when `BUILD_CURL_EXE=OFF`
Viktor Szakats [Mon, 27 Apr 2026 15:12:42 +0000 (17:12 +0200)] 
cmake: do not install shell completions when `BUILD_CURL_EXE=OFF`

Follow-up to 74542c1f4bfea75f92562075370fd839891cc440 #21459

Closes #21460

3 months agocmake: do not install `wcurl` when `BUILD_CURL_EXE=OFF`
Viktor Szakats [Mon, 27 Apr 2026 15:00:41 +0000 (17:00 +0200)] 
cmake: do not install `wcurl` when `BUILD_CURL_EXE=OFF`

Skip installing `wcurl.1` also.

Reported-by: Daniel Schulte
Fixes #21458
Follow-up to 23bed347b38922779382599f8b72c4d762add7bd #17035

Closes #21459

3 months agoGHA/checksrc: switch to zizmor `--persona` option
Viktor Szakats [Mon, 27 Apr 2026 12:55:40 +0000 (14:55 +0200)] 
GHA/checksrc: switch to zizmor `--persona` option

Closes #21457

3 months agotidy-up: whitespace
Viktor Szakats [Wed, 15 Apr 2026 21:57:35 +0000 (23:57 +0200)] 
tidy-up: whitespace

Closes #21456

3 months agowrite-out.md: minor language fix
Daniel Stenberg [Mon, 27 Apr 2026 09:41:34 +0000 (11:41 +0200)] 
write-out.md: minor language fix

Pointed out by Copilot

Closes #21455

3 months agotool_dirhie: fix to create drive-relative directory
Viktor Szakats [Sun, 26 Apr 2026 11:38:47 +0000 (13:38 +0200)] 
tool_dirhie: fix to create drive-relative directory

Fix to create the top directory `foo` when specified as
`X:foo\bar\filename`, on Windows and MS-DOS. Add test to verify.

Caught by Codex Security

Follow-up to 787ee935acd5867bdac836b2043b6095eed2c29e #16566

Closes #21449

3 months agotunits: initialize global `tool_stderr`
Viktor Szakats [Mon, 27 Apr 2026 08:49:45 +0000 (10:49 +0200)] 
tunits: initialize global `tool_stderr`

To avoid difficult to track down crashes when a tested function ends up
outputing a message via `errorf()`, `warnf()` or siblings.

Cherry-picked from #21449

Closes #21454

3 months agoruntests: fix linefeeds in log messages
Viktor Szakats [Sun, 26 Apr 2026 23:25:37 +0000 (01:25 +0200)] 
runtests: fix linefeeds in log messages

Cherry-picked from #21449

Closes #21452

3 months agounits: tidy up dynbuf init
Viktor Szakats [Sun, 26 Apr 2026 20:06:59 +0000 (22:06 +0200)] 
units: tidy up dynbuf init

Init dynbuf after global init to bring closer to use, improve
readability and sync test sources.

Closes #21451

3 months agosetopt: clear proxy auth properties when switching
Daniel Stenberg [Mon, 27 Apr 2026 07:14:51 +0000 (09:14 +0200)] 
setopt: clear proxy auth properties when switching

Verify with test 1588

Closes #21453

3 months agodocs/cmdline-opts/write-out.md: minor language edit
Daniel Stenberg [Sun, 26 Apr 2026 14:42:31 +0000 (16:42 +0200)] 
docs/cmdline-opts/write-out.md: minor language edit

3 months agodocs/cmdline-opts/write-out.md: tls_earlydata was adeded in 8.13.0
Daniel Stenberg [Sun, 26 Apr 2026 14:35:33 +0000 (16:35 +0200)] 
docs/cmdline-opts/write-out.md: tls_earlydata was adeded in 8.13.0

3 months agowrite-out.md: fix minor language mistake
Daniel Stenberg [Sun, 26 Apr 2026 14:18:12 +0000 (16:18 +0200)] 
write-out.md: fix minor language mistake

Closes #21450

3 months agoKNOWN_BUGS.md: Windows stdin relay accepts unauthenticated local connections
Daniel Stenberg [Fri, 24 Apr 2026 06:49:03 +0000 (08:49 +0200)] 
KNOWN_BUGS.md: Windows stdin relay accepts unauthenticated local connections

A windows developer could have a look at this.

Closes #21433

3 months agosectrust: fail on missing OCSP stapling
Stefan Eissing [Sat, 25 Apr 2026 08:34:06 +0000 (10:34 +0200)] 
sectrust: fail on missing OCSP stapling

When using Apple SecTrust, requiring the server to send
an OCSP response and does not, fail correctly.

Reported-by: Carlos Carrillo
Closes #21444

3 months agotest_22_httpsrr: avoid class name clash with `test_21_resolve`
Viktor Szakats [Sat, 25 Apr 2026 12:08:12 +0000 (14:08 +0200)] 
test_22_httpsrr: avoid class name clash with `test_21_resolve`

Spotted by GitHub Code Quality

Closes #21448

3 months agotidy-up: git options, ECH, HTTP/3 documentation
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.

Closes #21447