]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 weeks agoGHA/curl-for-win: upload snapshot Windows curl tool binary
Viktor Szakats [Wed, 1 Jul 2026 08:38:29 +0000 (10:38 +0200)] 
GHA/curl-for-win: upload snapshot Windows curl tool binary

These are generated for every PR and master pushes. Retain for 3 days.
Size is 1.8MB zipped per artifact. (Takes 1 second extra job time.)

Ref: #22162
Ref: https://github.com/curl/curl-for-win/commit/1b0e3569b393c31572a5895ed65ae6f60a8cba55?w=1

Closes #22234

4 weeks agotool_cb_hdr: de-duplicate filename setter
Viktor Szakats [Tue, 30 Jun 2026 21:58:38 +0000 (23:58 +0200)] 
tool_cb_hdr: de-duplicate filename setter

Closes #22232

4 weeks agoschannel: shut off experimental TLS 1.3 support for Win 10
Emmanuel Ugwu [Tue, 30 Jun 2026 20:07:17 +0000 (21:07 +0100)] 
schannel: shut off experimental TLS 1.3 support for Win 10

- Change minimum Windows version for TLS 1.3 support to
  Windows Server 2022.

Prior to this change Windows Server 2022 was already used as the minimum
version in some but not all of the checks for TLS 1.3 support.

Ref: https://github.com/curl/curl/pull/21719#issuecomment-4520234306
Ref: https://github.com/curl/curl/issues/21702

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
Closes https://github.com/curl/curl/pull/22231

4 weeks agoformdata: replace stray camelcase local function names
Viktor Szakats [Mon, 29 Jun 2026 22:22:02 +0000 (00:22 +0200)] 
formdata: replace stray camelcase local function names

Replace with names using the style in the rest of codebase. Also move
the object to left-hand side and action to the right-hand side.

Closes #22223

4 weeks agoopenssl: replace stray legacy API variant with `EVP_DigestInit_ex()`
Viktor Szakats [Mon, 29 Jun 2026 22:06:41 +0000 (00:06 +0200)] 
openssl: replace stray legacy API variant with `EVP_DigestInit_ex()`

To match rest of code, use the modern variant and avoid an unnecessary
internal reset/cleanup.

Closes #22222

4 weeks agombedtls: replace `memset()` with `psa_hash_operation_init()`
Viktor Szakats [Mon, 29 Jun 2026 14:12:10 +0000 (16:12 +0200)] 
mbedtls: replace `memset()` with `psa_hash_operation_init()`

To initialize hash contexts.

Ref: https://arm-software.github.io/psa-api/crypto/1.1/api/ops/hashes.html#c.psa_hash_operation_init
Follow-up to 3a305831d1a9d10b2bfd4fa3939ed41275fee7f7 #19077

Closes #22220

4 weeks agotests: pin connection reuse rules for partial, host, and credentials
Memduh Çelik [Tue, 30 Jun 2026 04:12:11 +0000 (07:12 +0300)] 
tests: pin connection reuse rules for partial, host, and credentials

Add classic tests 3223-3226 and extend tests/http/test_12_reuse.py so that
connection reuse decisions are explicit:

- partial/aborted HTTP/1.1 responses must not reuse the connection
  (premature multi_done closes non-multiplexed conns)
- different target hostnames must not share a connection even when they
  resolve to the same address (url_match_destination)
- HTTP Basic credentials are per-request (PROTOPT_CREDSPERREQUEST), so
  different -u values still reuse; assert that with num_connects
- same host positive control reuses (num_connects 1 then 0)

Closes #22224

4 weeks agosasl: fix zero-length response encoding
Patrick Monnerat [Mon, 29 Jun 2026 16:17:14 +0000 (18:17 +0200)] 
sasl: fix zero-length response encoding

A sasl zero-length normal response is an empty string, unlike an initial
response. Since the encoding of a zero-length initial response is
protocol dependent, move its handling to the protocol-specific sendauth
procedure. Similarly, do not check for an '=' server message, as this
should normally never occur.

Update the erroneous tests accordingly.

Closes #22218

4 weeks agosmtp: reject CR and LF in the envelope address
alhudz [Sun, 21 Jun 2026 12:29:09 +0000 (17:59 +0530)] 
smtp: reject CR and LF in the envelope address

Verified in test 2110

Closes #22119

4 weeks agoconfig2setopt.c: refactor config2setopts
Daniel Stenberg [Mon, 29 Jun 2026 10:02:14 +0000 (12:02 +0200)] 
config2setopt.c: refactor config2setopts

Introduce sub functions

Closes #22215

4 weeks agoCURLSHOPT_(UN)SHARE.md: do not modify shares while in use
Daniel Stenberg [Mon, 29 Jun 2026 15:41:34 +0000 (17:41 +0200)] 
CURLSHOPT_(UN)SHARE.md: do not modify shares while in use

Reported-by: smaeljaish on hackerone
Closes #22217

4 weeks agoopenldap: handle Curl_sasl_continue() returns better
Daniel Stenberg [Mon, 29 Jun 2026 08:44:47 +0000 (10:44 +0200)] 
openldap: handle Curl_sasl_continue() returns better

Similar to how it gets treated already in other protocol handlers.

Follow-up to eeca818b1e8d1e61c2d4

Reported-by: Eunsoo Kim
Closes #22213

4 weeks agocontent_encoding: give a clear error on multi-member gzip
HwangRock [Thu, 25 Jun 2026 13:00:04 +0000 (22:00 +0900)] 
content_encoding: give a clear error on multi-member gzip

A gzip Content-Encoding response holding more than one gzip member made
curl decode the first member and then fail the transfer with a bare
CURLE_WRITE_ERROR and no hint about the cause. Detect the trailing
member and fail with a message that explains what happened.

Fixes #22156
Closes #22172

4 weeks agoopenssl: prefer modern API flavors for `EVP_MD_CTX` new/free
Viktor Szakats [Mon, 29 Jun 2026 16:36:33 +0000 (18:36 +0200)] 
openssl: prefer modern API flavors for `EVP_MD_CTX` new/free

Available in all supported OpenSSL flavors and versions. They are
functionally identical to the legacy API calls.

Closes #22219

4 weeks agoCURLOPT_SSH_*_KEYFILE: used for setting up, then no more
Daniel Stenberg [Mon, 29 Jun 2026 06:05:16 +0000 (08:05 +0200)] 
CURLOPT_SSH_*_KEYFILE: used for setting up, then no more

So changing them after the connection is made still allows libcurl to
reuse the existing connections.

Reported-by: Bigtang on hackerone
Closes #22211

4 weeks agomod_curltest: fix compiler warnings
Viktor Szakats [Mon, 29 Jun 2026 09:17:04 +0000 (11:17 +0200)] 
mod_curltest: fix compiler warnings

```
mod_curltest.c:331:25: warning: result of comparison of unsigned expression >= 0 is always true [-Wtautological-unsigned-zero-compare]
  331 |           if(chunk_size >= 0) {
      |              ~~~~~~~~~~ ^  ~
mod_curltest.c:421:9: warning: declaration shadows a local variable [-Wshadow]
  421 |     int i, hd_len = (16 * 1024);
      |         ^
mod_curltest.c:288:7: note: previous declaration is here
  288 |   int i, chunks = 3, error_bucket = 1;
      |       ^
mod_curltest.c:501:40: warning: format specifies type 'int' but the argument has type 'unsigned int' [-Wformat]
  500 |                 "error_handler: request cleanup, r->status=%d, aborted=%d, "
      |                                                                        ~~
      |                                                                        %u
  501 |                 "close=%d", r->status, c->aborted, close_conn);
      |                                        ^~~~~~~~~~
mod_curltest.c:837:1: warning: missing field 'lock' initializer [-Wmissing-field-initializers]
  837 | };
      | ^
mod_curltest.c:914:43: warning: format specifies type 'int' but the argument has type 'apr_time_t' (aka 'long') [-Wformat]
  914 |     char *v = apr_psprintf(r->pool, "%d", limitrec.duration_sec);
      |                                      ~~   ^~~~~~~~~~~~~~~~~~~~~
      |                                      %ld
mod_curltest.c:956:16: warning: unused variable 'rv' [-Wunused-variable]
  956 |   apr_status_t rv;
      |                ^~
```

Closes #22214

4 weeks agoCREDENTIALS.md: remove comment about emtpy user/pass
Stefan Eissing [Mon, 29 Jun 2026 06:45:18 +0000 (08:45 +0200)] 
CREDENTIALS.md: remove comment about emtpy user/pass

Closes #22212

4 weeks agobuild: drop superfluous `STDC_HEADERS` macro
Viktor Szakats [Sun, 28 Jun 2026 10:19:11 +0000 (12:19 +0200)] 
build: drop superfluous `STDC_HEADERS` macro

It is traditionally defined by autotools to detect the presence of set
of standard C89 headers. autoconf 2.70 (2020-12-08) reduced the headers
covered to `stdlib.h`, `string.h`. After 2.59d (2006-06-05) obsoleting
it earlier. CMake replicated this detection, and curl included
`curl/stdcheaders.h` if standard headers were missing. However, such
condition could never happen because curl sources already assume all
checked standard headers (`stdarg.h`, `stdlib.h`, `string.h`) and
include them unconditionally.

Since this is an unused feature detection and an impossible fallback
path, drop them from CMake and curl's source. autotools continues to do
the detection by default, but its result is unused after this patch.

This leaves public `curl/stdcheaders.h` unused from within the codebase.

Refs:
https://github.com/autotools-mirror/autoconf/commit/f0c7c425539964047b0cb986d2ea5f5687a07069
https://github.com/autotools-mirror/autoconf/commit/86c213d0e355296f026a36e3203c0813041aae89

Follow-up to 65dae4ad80b02f25a25e17af62ea4f2940970330 #22191
Follow-up to 4c5307b45655ba75ab066564afdc0c111a8b9291
Ref: ae1912cb0d494b48d514d937826c9fe83ec96c4d

Closes #22206

4 weeks agocf-ngtcp2-cmn: initialize new callback ptr for ngtcp2 1.24.0+, bump in CI
Viktor Szakats [Sun, 28 Jun 2026 11:20:50 +0000 (13:20 +0200)] 
cf-ngtcp2-cmn: initialize new callback ptr for ngtcp2 1.24.0+, bump in CI

Fixes #22205

Closes #22207

4 weeks agoGHA: update dependency ngtcp2/nghttp3 to v1.17.0
renovate[bot] [Sat, 27 Jun 2026 06:41:26 +0000 (06:41 +0000)] 
GHA: update dependency ngtcp2/nghttp3 to v1.17.0

Closes #22202

4 weeks agocmake: minor improvements to `cmake_uninstall.in.cmake`
Viktor Szakats [Fri, 26 Jun 2026 20:56:02 +0000 (22:56 +0200)] 
cmake: minor improvements to `cmake_uninstall.in.cmake`

- reduce log noise by showing 'Uninstalling' message only if the file
  exists. (and a different message otherwise)
- replace cmake `rm` command with `file(REMOVE)`. For efficiency.
  Show manual message if the file could not be deleted.
  Ref: https://cmake.org/cmake/help/v3.18/command/file.html#remove
  Follow-up to 6d008352c667799beecb1ab1dfbc408c415d018c #22193
- reduce log noise by showing 'Uninstalled' only if the deletion was
  successful. (and a different message otherwise)
- display `DESTDIR` env value if set.
- drop checking, setting and showing `CMAKE_INSTALL_PREFIX`.
  The value was never predefined, also not used, besides showing it,
  and showing it is misleading because `--prefix` may override the
  configure-time value, and also superfluous because the filenames
  are showing the actual prefix anyway.

Follow-up to 27e2a4733c3321fb0b1a127360e8e96bc3d4ae53

Closes #22201

4 weeks agocmake: minor tidy-ups
Viktor Szakats [Fri, 26 Jun 2026 18:17:16 +0000 (20:17 +0200)] 
cmake: minor tidy-ups

- INSTALL-CMAKE.md: document that `CMAKE_INSTALL_PREFIX`
  may be set as environment (with CMake 3.29+)
  Ref: https://cmake.org/cmake/help/v3.29/variable/CMAKE_INSTALL_PREFIX.html
- CurlTests: fix copy-paste typo in comment.
  Spotted by GitHub Code Quality
- optimized out `_generated_dir` local variable.
- unfold a `@ONLY` to match rest of code.

Closes #22203

5 weeks agobuild: always use local `inet_pton()`/`inet_ntop()` implementations
Viktor Szakats [Thu, 25 Jun 2026 10:48:26 +0000 (12:48 +0200)] 
build: always use local `inet_pton()`/`inet_ntop()` implementations

Also repurpose existing build-time feature checks into unit test 1961,
to verify.

Prior to this patch these functions were auto-detected with both
autotools and cmake. In case of autotools there was an extra
verification phase ensuring the functions work as expected. This step
required running the function, thus was limited to non-cross-builds. For
cross-builds and CMake it always used the system implementation if
present. On Windows it always used the local implementation, because
availability/use is complicated there.

After this patch all platforms, always use the local implementation,
which is known to be accurate. This makes curl behave more consistently,
and simplifies the build process, a fixes cross-builds and CMake
auto-detection differences.

Also:
- test1960: enable unconditionally.
- checksrc: disallow globally, allowlist in `block_ip.c` example.
- dnsd: verify ntop result for NULL before passing to printf.

Ref: https://github.com/curl/curl/pull/22137#issuecomment-4797440983
Ref: #22137
Ref: 8537a5b0bcf4565551774c2b2375c49767e405a7 #16577

Closes #22170

5 weeks agolib: fix 'ns' -> 'us' in trace messages
Viktor Szakats [Fri, 26 Jun 2026 21:40:24 +0000 (23:40 +0200)] 
lib: fix 'ns' -> 'us' in trace messages

Closes #22200

5 weeks agocurl_trc: store callback info in a uint8, not a bool
Daniel Stenberg [Fri, 26 Jun 2026 21:01:26 +0000 (23:01 +0200)] 
curl_trc: store callback info in a uint8, not a bool

The state is no longer just a bool so make sure to use a proper uint8_t
so that it gets restored properly.

Follow-up to a6af50c484f6bbd1c01573685d

Closes #22199

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 26 Jun 2026 21:17:26 +0000 (23:17 +0200)] 
RELEASE-NOTES: synced

Add entry to .mailmap

5 weeks agogopher: reject CR and LF in the selector
alhudz [Sat, 20 Jun 2026 09:32:19 +0000 (15:02 +0530)] 
gopher: reject CR and LF in the selector

Verifed in test 1609

Closes #22116

5 weeks agolib: hostname related cleanups
Stefan Eissing [Mon, 22 Jun 2026 08:45:42 +0000 (10:45 +0200)] 
lib: hostname related cleanups

* format `data->state.aptr.host` without crlf, so signatures do not need
  to strip it again. Add the crlf when adding the header to the request
  dynbuf
* check `connect-to` strings on normalized hostname and user supplied
  hostname (when those differ)
* libssh: always use the peer for setting ssh option SSH_OPTIONS_HOST,
  preserve ipv6 [] enclosure, use IDN converted hostname otherwise. This
  is the libssh documented expectation.
  Do NOT use strings from URL parsing.

Closes #22128

5 weeks agoVULN-DISCLOSURE-POLICY.md: issues that should be found by tests are LOW
Daniel Stenberg [Fri, 26 Jun 2026 14:23:08 +0000 (16:23 +0200)] 
VULN-DISCLOSURE-POLICY.md: issues that should be found by tests are LOW

Closes #22190

5 weeks agolib1587: fix gcc `-Wconversion` with LibreSSL on Windows, test in CI
Viktor Szakats [Fri, 26 Jun 2026 17:48:17 +0000 (19:48 +0200)] 
lib1587: fix gcc `-Wconversion` with LibreSSL on Windows, test in CI

By exposing and reusing existing custom type via `vtls/openss.h`.

Also:
- GHA/curl-for-win: test in CI by enabling building tests.
  Cost is 45s per job, so limit it to the gcc job.

Seen with Windows x64 gcc (not tested in CI prior to this patch):
```
tests/libtest/lib1587.c:50:7: error: conversion from 'opt1587' {aka 'long long unsigned int'} to 'long int' may change value [-Werror=conversion]
   50 |       SSL_CTX_set_options(info->internals, opts);
      |       ^~~~~~~~~~~~~~~~~~~
tests/libtest/lib1587.c:59:7: error: conversion from 'opt1587' {aka 'long long unsigned int'} to 'long int' may change value [-Werror=conversion]
   59 |       SSL_set_options(info->internals, opts);
      |       ^~~~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/28258372229/job/83727170184?pr=22195#step:3:4884

Ref: da2f05e6f6cee66ea46b8b1ca3943e5a6dde0b91 #22198
Ref: 616356646159379ab091502cdc90113dc8cc11eb #22197
Follow-up to 3e40ccb87581b0f6180fbd9c1eef9c50f270c806 #21290
Follow-up to 2db8ae480fdcae7f005bf847fbbf837821c8184c #17809 #17801

Closes #22195

5 weeks agocmake: fix not to build `tunits` when `BUILD_CURL_EXE=OFF`
Viktor Szakats [Fri, 26 Jun 2026 18:45:07 +0000 (20:45 +0200)] 
cmake: fix not to build `tunits` when `BUILD_CURL_EXE=OFF`

It fails as expected, with a list of errors:
```
In file included from _x64-win-ucrt-for-trurl-bld/tests/tunit/tunits.c:5:
tests/tunit/tool1394.c:76:11: error: call to undeclared function 'parse_cert_parameter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   76 |     err = parse_cert_parameter(p->param, &certname, &passphrase);
      |           ^
[...]
tests/tunit/tool1622.c:68:5: error: call to undeclared function 'timebuf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   68 |     timebuf(buffer, sizeof(buffer), secs);
      |     ^
[...]
tests/tunit/tool1623.c:104:26: error: call to undeclared function 'GetSizeParameter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  104 |     ParameterError err = GetSizeParameter(check[i].input, &output);
      |                          ^
[...]
```
Ref: https://github.com/curl/curl/actions/runs/28256499057/job/83720797064?pr=22195

Ref: #22195
Ref: https://github.com/curl/curl-for-win/commit/640fed88b65052e944edb466387bd8a062bd9b37

Closes #22198

5 weeks agoopenssl: drop unused pre-OpenSSL3 `ctx_option_t` typedef
Viktor Szakats [Fri, 26 Jun 2026 18:20:01 +0000 (20:20 +0200)] 
openssl: drop unused pre-OpenSSL3 `ctx_option_t` typedef

Follow-up to 69c89bf3d3137fcbb2b8bc57233182adcf1e2817 #18330

Closes #22197

5 weeks agocmake: dedupe expressions into local vars in `cmake_uninstall.in.cmake`
Viktor Szakats [Fri, 26 Jun 2026 15:00:07 +0000 (17:00 +0200)] 
cmake: dedupe expressions into local vars in `cmake_uninstall.in.cmake`

Also: use `IN LISTS` syntax.

Follow-up to 27e2a4733c3321fb0b1a127360e8e96bc3d4ae53

Closes #22194

5 weeks agocmake: stop probing unused `float.h` for `STDC_HEADERS`
Viktor Szakats [Mon, 22 Jun 2026 21:00:05 +0000 (23:00 +0200)] 
cmake: stop probing unused `float.h` for `STDC_HEADERS`

Also to sync up with current autotools, which stopped testing for it at
one point.

Follow-up to 4c5307b45655ba75ab066564afdc0c111a8b9291

Closes #22191

5 weeks agocmake: replace deprecated `remove` command with `rm` and pass arg safely
Viktor Szakats [Fri, 26 Jun 2026 15:25:16 +0000 (17:25 +0200)] 
cmake: replace deprecated `remove` command with `rm` and pass arg safely

All curl-supported CMake versions support the modern method, along with
the `--` marker.

Also:
- make sure to pass `-f` to not fail if the file is missing, as before
  this patch.
- drop now redundant `OUTPUT_QUIET`, `ERROR_QUIET` and error handling
  in `cmake_uninstall`.
- move filename to end of the error message for readability.
- GHA/linux: test these two 'clean' targets in the aws-lc job.

Refs:
https://cmake.org/cmake/help/v4.4/manual/cmake.1.html#cmdoption-cmake-E-arg-remove
https://cmake.org/cmake/help/v3.18/manual/cmake.1.html#run-a-command-line-tool

Closes #22193

5 weeks agocmake: flatten build tree, tidy up base dir variables
Viktor Szakats [Fri, 26 Jun 2026 13:54:30 +0000 (15:54 +0200)] 
cmake: flatten build tree, tidy up base dir variables

- drop `generated` subdir, move these files to build root.
  To move them next to CPack and other config files, and to avoid
  a subdirectory for only 2 files.
  Follow-up to 69328490fc91bfa00a6a90da84239524b01f5527 #2849

- add 'Consumed variables' comment for `CMake/cmake_uninstall.in.cmake`.

- move generated `cmake_uninstall.cmake` to the build root directory
  (from `CMake/`). To:
  - avoid creating a `CMake` subdirectory within the build directory
    with this single file in it.
  - move it next to its `cmake_install.cmake` counterpart.
  - move it next to `install_manifest.txt` which it relies on.

  Follow-up to 27e2a4733c3321fb0b1a127360e8e96bc3d4ae53

- Use `PROJECT_SOURCE_DIR` for these files, replacing
  `CMAKE_CURRENT_SOURCE_DIR`, to make it consistent with rest of CMake
  sources, and to reduce ambiguity in `CMake/cmake_uninstall.in.cmake`
  template.

Follow-up to 8198e388d31919ec610908d496d34ced2daf4fea #22188
Follow-up to 4839029645bae1ff7f17e0f1c7543bc3eb30f471 #22187
Follow-up to 9126eb5a8ad96f156586942facb069383a09c046 #15331

Closes #22192

5 weeks agoGHA/windows: set `VCPKG_APPLOCAL_DEPS=OFF` for vcpkg jobs
Viktor Szakats [Mon, 22 Jun 2026 02:03:45 +0000 (04:03 +0200)] 
GHA/windows: set `VCPKG_APPLOCAL_DEPS=OFF` for vcpkg jobs

Add the necessary directory to `PATH` instead.

To disable a vcpkg feature (auto-copying DLL dependencies next to the
build targets) that was causing CI flakiness in the libssh2 repository.
In curl it currently cannot cause flakiness because targets (with DLL
dependencies) reside in separate directories.

AFAIU this vcpkg feature has been present and enabled by default for
a long time, but only a recent update made it visible in the log and
flaky at the same time, due to switching implementation.

This patch removes log noise and potential issues, improves efficiency,
and saves disk space: 74MB -> 71 in UWP, and 69MB -> 65 in the arm64 job.
Time saving is negligible with current jobs.

Refs:
https://github.com/libssh2/libssh2/pull/2114
https://github.com/libssh2/libssh2/commit/30a0484cb7b350d779dbca87dbf9d7ba18a03547
https://github.com/microsoft/vcpkg/pull/52315
https://learn.microsoft.com/vcpkg/reference/installation-tree-layout

Closes #22189

5 weeks agocmake: tidy-up base directory variable for `include/*`/`CMake/*` files
Viktor Szakats [Fri, 26 Jun 2026 10:22:05 +0000 (12:22 +0200)] 
cmake: tidy-up base directory variable for `include/*`/`CMake/*` files

Use `PROJECT_SOURCE_DIR` for these files, replacing
`CMAKE_CURRENT_SOURCE_DIR`, to make it consistent with rest of CMake
sources and to reflect that the locations of these files are fixed and
do not depend on the CMake source location referencing them.

Exception: keep as-is before calling `project()`, which is where
`PROJECT_SOURCE_DIR` is initialized.

Ref: https://cmake.org/cmake/help/v3.18/command/project.html

Follow-up to #22187
Follow-up to 9126eb5a8ad96f156586942facb069383a09c046 #15331

Closes #22188

5 weeks agocmake: robustify base path in local file reference
Viktor Szakats [Tue, 23 Jun 2026 18:18:26 +0000 (20:18 +0200)] 
cmake: robustify base path in local file reference

To make the macro find this file also when used elsewhere than the root
`CMakeLists.txt`. Current code only uses it from the root.

Follow-up to 88c17d5587447b367c7ec836ff9b847860f52f75

Closes #22187

5 weeks agotidy-up: syntax and code nits
Viktor Szakats [Mon, 15 Jun 2026 12:36:05 +0000 (14:36 +0200)] 
tidy-up: syntax and code nits

- cmp-pkg-config.sh: replace `-r -f` with `-rf` to match rest of repo.
- configure.ac: add double quotes for robustness (not a bug).
- curl-openssl.m4: merge nested `if`s.
- CurlTests.c: drop `!= 0`, also to sync with m4.
- CurlTests.c: replace `example.com` with `localhost` in
  `gethostbyname()` feature test code. (compile-only, not a bug)
- GHA/http3-linux: drop literal `true` from bool expression.
- lib650: drop redundant `&`.
- move variable/call to left-hand side of equality checks, where
  missing.
- perl: detach `<`/`>` from filename in `open()`, where missing.
- schannel: apply two nit fixes lost in rebase.
- scripts/verify-release: drop redundant double quotes.
- scripts/verify-release: exit with error code on error.
- synctime: replace magic numbers with `sizeof()`.
- telnet: add missing parentheses to macro value.
- tests/Makefile.am: use single quotes.
- tool_operate: drop redundant `break` after `return` in VMS code.
- unit2413: drop unused NULL pointer + free call.
- unit2413: fix duplicate test case name.
- urlapi: drop redundant parentheses.
- urlapi: drop `CURL_UNCONST()` that became redundant.

Closes #22186

5 weeks agohttp: trim custom header name before the Authorization drop
Alhuda Khan [Thu, 25 Jun 2026 20:48:07 +0000 (02:18 +0530)] 
http: trim custom header name before the Authorization drop

A custom header name padded with blanks (`Authorization :`) missed the
exact-length compare and slipped past the cross-host Authorization and
Cookie drop, forwarding the header to the redirect target. Trim the
parsed name in both the request and proxy CONNECT header builders.

Closes #22178

5 weeks agourlpieces: remove members that live in peers/creds
Stefan Eissing [Thu, 25 Jun 2026 09:36:23 +0000 (11:36 +0200)] 
urlpieces: remove members that live in peers/creds

Remove members of `struct urlpieces` that now live in peers/creds.

Change all remaining uses of those urlpieces.

When comparing schemes, use the protocol constants.

Closes #22171

5 weeks agoaltsvc: use Curl_peer in processing
Stefan Eissing [Fri, 26 Jun 2026 08:50:14 +0000 (10:50 +0200)] 
altsvc: use Curl_peer in processing

Use `data->state.origin` when processing alt-avc information.

Decomplexify parsing function.

Closes #22184

5 weeks agoconncache: connection alive checks intervals
Stefan Eissing [Thu, 25 Jun 2026 11:25:35 +0000 (13:25 +0200)] 
conncache: connection alive checks intervals

Do not check if a particular connection is alive or not more than once
every second. We did this on every connection reuse which is overkill
when sending many requests to the same host.

Closes #22169

5 weeks agoproxy: optimized env lookups
Stefan Eissing [Thu, 25 Jun 2026 11:14:17 +0000 (13:14 +0200)] 
proxy: optimized env lookups

Optimize proxy env var lookups for the commen case of 'https' and 'http'
urls. We do this for every transfer.

Closes #22168

5 weeks agomulti: forbid curl_easy_pause from within multi socket callback
Daniel Stenberg [Thu, 25 Jun 2026 20:52:07 +0000 (22:52 +0200)] 
multi: forbid curl_easy_pause from within multi socket callback

- there is a risk for a nasty recursive situation

- we avoid certain risks that the pause call changes things so that when
  returning from the callback, the state of some internals is undefined
  and we need to reload which is easy to miss

- we can't think of legitiate use cases for doing this. This is
  basically just the new favorite point for AI and security researchers
  to find hypothetical problems

Closes #22179

5 weeks agotool_operate: remove call to abort()
Daniel Stenberg [Fri, 26 Jun 2026 07:37:09 +0000 (09:37 +0200)] 
tool_operate: remove call to abort()

Make an assert and return a plain error instead. No abort in release
code.

- also remove from two examples
- add as a banned function in checksrc
- document the banned state

Closes #22182

5 weeks agotidy-up: docs, comments, typos, whitespace
Viktor Szakats [Mon, 15 Jun 2026 12:33:20 +0000 (14:33 +0200)] 
tidy-up: docs, comments, typos, whitespace

- GHA/windows: mention `IgnoreStandardErrorWarningFormat=true`
  in comment.
- cmake: fix MIT/GNU GSS order in messages.
- drop some exclamation marks from messages.
- drop redundant ending newlines from messages.
- fold/unfold where possible.
- fix indent, whitespace, typos and other nits.

Closes #22185

5 weeks agocmake: document upstream variable `ZLIB_ROOT`
Viktor Szakats [Thu, 25 Jun 2026 19:19:25 +0000 (21:19 +0200)] 
cmake: document upstream variable `ZLIB_ROOT`

Closes #22177

5 weeks agocmake: drop logic for `GNU/kFreeBSD` systems
Viktor Szakats [Thu, 25 Jun 2026 18:42:16 +0000 (20:42 +0200)] 
cmake: drop logic for `GNU/kFreeBSD` systems

Adopting change made in CMake, with description: "kFreeBSD is no longer
maintained or supported and was never an officially-supported release
architecture for Debian."

This system name was also dropped by CMake 4.1+:
https://cmake.org/cmake/help/v4.2/variable/CMAKE_SYSTEM_NAME.html

Credits-to: Roger Leigh
Ref: https://gitlab.kitware.com/cmake/cmake/-/commit/99c8abed55c354f5674e52b25bb65391d4afca52
Ref: https://gitlab.kitware.com/cmake/cmake/-/work_items/26742
Ref: https://gitlab.kitware.com/cmake/cmake/-/work_items/26722

Follow-up to 5de6848f104d7cb0017080e31216265ac19d0dde #10023 #5935

Closes #22176

5 weeks agourlapi: make two #defines instead of magic values/strings in code
Daniel Stenberg [Fri, 26 Jun 2026 07:34:01 +0000 (09:34 +0200)] 
urlapi: make two #defines instead of magic values/strings in code

Closes #22181

5 weeks agodocs/INSTALL: minor polish
Daniel Stenberg [Fri, 26 Jun 2026 07:39:41 +0000 (09:39 +0200)] 
docs/INSTALL: minor polish

Closes #22183

5 weeks agoINSTALL.md: add building-from-source overview section
Viktor Szakats [Fri, 19 Jun 2026 20:32:06 +0000 (22:32 +0200)] 
INSTALL.md: add building-from-source overview section

Ref: #22098

Closes #22113

5 weeks agoGHA: bump some jobs to ubuntu-26.04
Viktor Szakats [Thu, 18 Jun 2026 17:39:33 +0000 (19:39 +0200)] 
GHA: bump some jobs to ubuntu-26.04

In jobs that may benefit from newer tool versions (pyspelling, possibly
CodeQL, CM integration, configure-vs-cmake). Also curl-for-win to match
the curl/curl-for-win repo that also bumped. Bump some Linux jobs to add
variation. Also the rest of `check*` jobs for no particular reason other
than using the latest.

Follow-up to 8f5e4f020e79ec1fd1e8540bdea3c1c20030405b #22097
Follow-up to 139ce4d37cfdc3126179bdb166ec61a095360c62 #22096
Follow-up to e44f1a1446f8e72573e5a1026807e71a0495f88d #22094

Closes #22092

5 weeks agourlapi: do not keep an internal port string
Stefan Eissing [Thu, 25 Jun 2026 09:18:27 +0000 (11:18 +0200)] 
urlapi: do not keep an internal port string

Do not allocated an internal port string, just keep and number and a bit
if it is present. Format the port string in a local buffer when someone
asks for it and copy that.

This avoid the format/alloc penalty when parsing URLs and no one ever
asking for the port string.

(And there will be a method to get the uint16_t value directly in
 another PR)

Closes #22167

5 weeks agoruntests: exit with error on `-k` option
Viktor Szakats [Thu, 25 Jun 2026 09:34:41 +0000 (11:34 +0200)] 
runtests: exit with error on `-k` option

Ref: https://github.com/curl/curl/pull/22157#discussion_r3473254887
Follow-up to 481e10160f4810dc7731922b3a98461deb1dcbed #22157

5 weeks agoruntests: restore `-k` option and actively process as no-op
Viktor Szakats [Wed, 24 Jun 2026 15:04:03 +0000 (17:04 +0200)] 
runtests: restore `-k` option and actively process as no-op

Restore processing this option to avoid falling it through and
misinterpreted as something else, which in turn disables tests.

Exit with an error instead. We delete completely in December 2026.

Reported-by: Sam James
Bug: https://github.com/curl/curl/pull/22100#issuecomment-4789828929
Follow-up to 04305a3e40989d3731e97bd0ef41bbd55c680a3f #22100
Follow-up to 6617db6a7ed322d28322896aa20bcabf3a479e7c #4035

Closes #22157

5 weeks agoautotools: minor fixes and improvements
Viktor Szakats [Wed, 24 Jun 2026 11:43:28 +0000 (13:43 +0200)] 
autotools: minor fixes and improvements

- Makefile.am: add root `test-quiet` target that maps to
  `tests/quiet-test`, for completeness.
  Ref: #22098

- tests/Makefile.am: drop unused remains of `MANFILES`.
  Follow-up to fa3f889752e6b5034966de61a372a60773a69ca8 #17463
  Also replace the `distclean` target to delete `CLEANFILES`, otherwise
  the CI dist job fails. (I'm not grokking why)

- tests/Makefile.am: sync up `tests` target with CMake, to pass `TFLAGS`
  `-a`.
  Follow-up to 904e7ecb66519951681377758fe6b07dde28ce36 #19347

- tests/certs/Makefile.am: fix to clean generated certs via `CLEANFILES`
  to comply with autotools documentation, which says the previously used
  variable `DISTCLEANFILES` is meant for files created by `./configure`.
  Ref: https://www.gnu.org/software/automake/manual/html_node/Clean.html
  Follow-up to 44341e736a3e2f7a2b25a774be3a9796e81abab9 #16824

- tests/http/Makefile.am: add `./` prefix to glob passed to `rm -rf` on
  clean, to avoid deleting unintented files, or pass unintended options.
  Follow-up to 671158242db32032a41e8da89da33d773b481ef8 #10349

Cherry-picked from #22102
Cherry-picked from #22150

Closes #22154

5 weeks agoscripts: use end-of-options marker in `cd`, `mkdir`, `mv`, `sha256sum` commands
Viktor Szakats [Tue, 23 Jun 2026 21:14:24 +0000 (23:14 +0200)] 
scripts: use end-of-options marker in `cd`, `mkdir`, `mv`, `sha256sum` commands

Where missing. To avoid passing an option by accident.

End-of-option marker (`--`) is not POSIX, but most of these scripts are
internal and/or CI-focused, where this is fine. `maketgz` and
`verify-release` are meant for public use, and I asses this is fine too,
but let us know if this causes issues in real world envs.

Also:
- maketgz: pass args with `:?` to `rm -rf`, where missing.
  Cannot cause an actual issue with current code.
- verified `cp`, `rm` instances too, but none were affected.
- tests/cmake/test.sh: replace `$PWD` with `$(pwd)` for sturdiness.
- appveyor.sh: replace `$PWD` with `$(pwd)` for sturdiness.

Assisted-by: Dan Fandrich
Follow-up to 6aab1dc2639d4fc8aaaa1190914b0491e029dace #19450

Closes #22150

5 weeks agobuild: enable thread-safe `getaddrinfo()` for OpenBSD, and other tidy-ups
Viktor Szakats [Mon, 22 Jun 2026 20:41:07 +0000 (22:41 +0200)] 
build: enable thread-safe `getaddrinfo()` for OpenBSD, and other tidy-ups

Aka `HAVE_GETADDRINFO_THREADSAFE`.

- enable it for OpenBSD 5.4+ (2013-11-01).
  Also adjust cmake pre-fill.

- explicitly opt-in DragonFly BSD, for 2.2.0+ (2009-02-17).
  Assuming this commit implemented this feature:
  https://github.com/DragonFlyBSD/DragonFlyBSD/commit/21fcee4d6e84a10a35d21e920106590570511048#diff-498ff649e8770eb9a94e99a399a4b473fcea41ef58b033a2a2dae3809e17bb04
  Prior to this patch it was enabled in autotools by accident, because
  its host ID misses `bsd` so the global BSD disable was not applied.

- autotools: fix to enable for Darwin 9+ / macOS 10.5+ (2007-10-26).
  Prior to this patch it was Darwin 6 / macOS 10.2.
  Source: https://github.com/python/cpython/issues/70112
  Ref: https://en.wikipedia.org/wiki/MacOS_version_history
  10.5 was the first one UNIX '03 certified, which requires this
  feature. iOS and others were forked from this codebase, so they also
  have support.

- cmake: add version numbers as comments.
  Sadly the OS versions are not verified. This and the autotools logic
  could possibly be implemented in `curl-setup.h` more accurately, for
  all build systems, without duplicating logic.

Also:
- cmake: `BSD` variable requires CMake 3.25+, add fallback code where
  missing.
  Ref: https://cmake.org/cmake/help/v3.25/variable/BSD.html
- unix-cache.cmake: stop listing all BSDs for `HAVE_PIPE2`,
  and fix generic BSD filter for CMake <3.25.
- unix-cache.cmake: stop listing all BSDs, since it's prefilled anyway
  for those via `OtherTests.cmake`.

Ref: https://github.com/curl/curl/pull/22138#issuecomment-4773617195

Closes #22148

5 weeks agossh: dedupe `ssh_pollset()` functions
Viktor Szakats [Sat, 20 Jun 2026 09:08:07 +0000 (11:08 +0200)] 
ssh: dedupe `ssh_pollset()` functions

Closes #22115

5 weeks agotool: optimize setopt use
Stefan Eissing [Thu, 25 Jun 2026 08:47:22 +0000 (10:47 +0200)] 
tool: optimize setopt use

- tool_setopt_long: lookup default value on for --libcurl where it is
  used
- tool_setoot_str: use `const char *` arg instead of var args.

Closes #22166

5 weeks agotool: do not flush on out-null
Stefan Eissing [Thu, 25 Jun 2026 08:45:02 +0000 (10:45 +0200)] 
tool: do not flush on out-null

Do not flush output when --out-null is set.

Closes #22165

5 weeks agotool: init progress bar on demand
Stefan Eissing [Thu, 25 Jun 2026 08:42:17 +0000 (10:42 +0200)] 
tool: init progress bar on demand

Determine the terminal size on first invocation, not for all
transfers.

Closes #22164

5 weeks agotest 1560: test RFC4291 style IPv6 IPv4-mapped addresses
Daniel Stenberg [Mon, 22 Jun 2026 14:14:23 +0000 (16:14 +0200)] 
test 1560: test RFC4291 style IPv6 IPv4-mapped addresses

Closes #22136

5 weeks agocurl-functions.m4: verify working RFC 4291 zero prefixed IPv4 - mapped format
Daniel Stenberg [Mon, 22 Jun 2026 14:31:49 +0000 (16:31 +0200)] 
curl-functions.m4: verify working RFC 4291 zero prefixed IPv4 - mapped format

Detect incompatible inet_ntop() call for IPv6 output.

Closes #22136

5 weeks agomulti_ev: refresh sock entry after remove callback
Stefan Eissing [Thu, 25 Jun 2026 08:19:17 +0000 (10:19 +0200)] 
multi_ev: refresh sock entry after remove callback

This was missed in the fix for CVE-2026-9080.

Reported-by: stze on hackerone
URL: https://hackerone.com/reports/3823985
Closes #22163

5 weeks agomqtt: reject control bytes in the topic
alhudz [Fri, 19 Jun 2026 16:45:20 +0000 (22:15 +0530)] 
mqtt: reject control bytes in the topic

Closes #22112

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 25 Jun 2026 06:41:27 +0000 (08:41 +0200)] 
RELEASE-NOTES: synced

and bump curlver.h

5 weeks agosws: allow connection-monitor to log all disconnects
Samuel Dainard [Wed, 24 Jun 2026 19:53:52 +0000 (19:53 +0000)] 
sws: allow connection-monitor to log all disconnects

Remove the suppression of connmon after the first disconnect event. The
connmon flag is set per-test via the 'connection-monitor' server command
and should remain active for the lifetime of that test's connections to
properly detect connection reuse failures.

The suppression was introduced in 510fdad to work around a connection
reuse regression that has since been resolved by the credentials
refactoring in 8f71d0f. With the underlying issue fixed, restoring full
disconnect logging strengthens tests like 338 to catch future
regressions in connection reuse logic.

Fixes #22158
Closes #22159

5 weeks agoldap: support insecure mode for Windows native LDAP
Jay Satiro [Wed, 24 Jun 2026 05:59:05 +0000 (01:59 -0400)] 
ldap: support insecure mode for Windows native LDAP

- Bypass cert verification if verifypeer is disabled.

Prior to this change libcurl lacked the ability to bypass certificate
verification for Windows native LDAP (USE_WIN32_LDAP). A comment said
"Win32 LDAP SDK does not support insecure mode without CA!" but I found
that we can bypass the check by setting a verify callback to override
Windows' internal verify check.

Closes https://github.com/curl/curl/pull/22152

5 weeks agoGHA: update debian:bookworm-slim Docker digest to 60eac75
renovate[bot] [Wed, 24 Jun 2026 04:24:50 +0000 (04:24 +0000)] 
GHA: update debian:bookworm-slim Docker digest to 60eac75

Closes #22151

5 weeks agoGHA/linux: drop unused pip packages from Alpine job
Viktor Szakats [Wed, 24 Jun 2026 09:03:18 +0000 (11:03 +0200)] 
GHA/linux: drop unused pip packages from Alpine job

py3-impacket, py3-asn1, py3-six and py3-pycryptodomex.

Number of tests run remain 1848 / 1847 for the two jobs respectively.
Number of installed packages go from 158 to 117, and from 177 to 142
(for the two jobs respectively; using different Alpine versions).

Closes #22153

5 weeks agoRELEASE-NOTES: synced curl-8_21_0
Daniel Stenberg [Wed, 24 Jun 2026 05:52:50 +0000 (07:52 +0200)] 
RELEASE-NOTES: synced

5 weeks agoVERSIONS: 8.21.0 release
Daniel Stenberg [Wed, 24 Jun 2026 05:52:50 +0000 (07:52 +0200)] 
VERSIONS: 8.21.0 release

5 weeks agoTHANKS: added names from 8.21.0 release
Daniel Stenberg [Wed, 24 Jun 2026 05:52:50 +0000 (07:52 +0200)] 
THANKS: added names from 8.21.0 release

5 weeks agoGHA/non-native: BSD overhaul, test more autotools, bump versions
Viktor Szakats [Tue, 23 Jun 2026 10:08:25 +0000 (12:08 +0200)] 
GHA/non-native: BSD overhaul, test more autotools, bump versions

- add autotools jobs for MidnightBSD, NetBSD, OpenBSD.
  Takes under 3 minutes per new job, under +6m in total.
  - comment out MidnightBSD to save CI time.
  - to make them as fast as possible, skip building tests and examples,
    and omit libidn2, openldap dependencies.
- add DragonFly BSD cmake job, which finally works.
  (keep it commented out since the package server fails frequently.)
- do `mport index/upgrade` to make MidnightBSD autotools builds work.
- rework filtering MidnightBSD package manager's excessive log output.
- fixup OpenBSD autotools job to uninstall system curl to avoid linking
  against it (and breaking debug builds).
- make OpenBSD package manager commands non-interactive.
- specify install packages for each matrix entry.
- make autotools build step verbose (to ease debugging).
- add link to DragonFly BSD package repo.
- bump cross-platform-actions from 1.1.0 to 1.3.0.
- bump FreeBSD 15.0 to 15.1.
- bump OpenBSD to 7.7 to 7.9.
  This did not go well last time with 7.8, let's see with 7.9.
  Ref: 8d00e28136baf661455f1fe5980a0d18c4d872e3 #19372
  Ref: c3b890b2c005401e18b54dacf9e63d33412e2b4f #19368
- sync test-skipper keywords with rest of workflows.
- drop installing impacket. It was unused.
  (also a slow install with many dependencies)

The original motivation was to prepare fixing OpenBSD's (and possibly
other platforms) `getaddrinfo()` thread-safety check.
Ref: https://github.com/curl/curl/pull/22138#issuecomment-4773617195

Closes #22145

5 weeks agotest 679: add a quoted string name in a netrc test
Daniel Stenberg [Tue, 23 Jun 2026 15:07:34 +0000 (17:07 +0200)] 
test 679: add a quoted string name in a netrc test

By using quotes a user name can have a space in netrc

Closes #22147

5 weeks agoGHA/linux: bump pizlonator/fil-c to v0.680, fixup quoting
Viktor Szakats [Tue, 23 Jun 2026 09:28:15 +0000 (11:28 +0200)] 
GHA/linux: bump pizlonator/fil-c to v0.680, fixup quoting

Also put the version number in quotes to avoid GHA altering the number
into `0.68` (without rightmost zero) and ending up storing that in the
`FIL_C_VERSION` env.

Hopefully Renovate will honor this on future bumps.

Do the same for the rest of `x.y` format version numbers.

Fixing:
```
env:
[...]
    FIL_C_VERSION: 0.68
```
Ref: https://github.com/curl/curl/actions/runs/28006009260/job/82920767558?pr=22142#step:5:16

Fixes #22142

Closes #22143

5 weeks agoRELEASE-PROCEDURE.md: typo
Daniel Stenberg [Tue, 23 Jun 2026 08:05:41 +0000 (10:05 +0200)] 
RELEASE-PROCEDURE.md: typo

5 weeks agoGHA/windows: settle on windows-2025 image name
Viktor Szakats [Mon, 22 Jun 2026 21:58:49 +0000 (23:58 +0200)] 
GHA/windows: settle on windows-2025 image name

It's the final/stable image name and it's shipping with VS2026 now.

Ref: https://github.com/actions/runner-images/issues/14017
Follow-up to b0239417b34238121165dee465afb944cbad17ec #21713

Closes #22139

5 weeks agocmake: add pre-fills for DragonFly BSD and MidnightBSD
Viktor Szakats [Mon, 22 Jun 2026 19:17:24 +0000 (21:17 +0200)] 
cmake: add pre-fills for DragonFly BSD and MidnightBSD

Based on CI runs:
DragonFlyBSD: https://github.com/curl/curl/actions/runs/27978506617/job/82802332910 (autotools)
MidnightBSD: https://github.com/curl/curl/actions/runs/27977103321/job/82797523470 (cmake)

Also readd DragonFly BSD to GHA/non-native, but keep it commented.

Closes #22138

5 weeks agodoh: drop redundant `curlx_dyn_free()` call in `doh_probe_done()`
Viktor Szakats [Mon, 22 Jun 2026 12:36:34 +0000 (14:36 +0200)] 
doh: drop redundant `curlx_dyn_free()` call in `doh_probe_done()`

The buffer is freed on the next instruction via `Curl_meta_remove()`'s
destructor.

Reported-by: netspacer.research
Follow-up to 1ebd92d0fdbb1693c926f7190442dff00226fbf3 #16384

Closes #22133

5 weeks agotidy-up: make 'CA' uppercase, where missing
Viktor Szakats [Mon, 22 Jun 2026 13:52:23 +0000 (15:52 +0200)] 
tidy-up: make 'CA' uppercase, where missing

```sh
git grep -w ca | grep -v -E -i 'ca[;"=/()%_.-]' | grep -v -E -i '[*$"=/()%_.-]ca'
```

Closes #22135

5 weeks agoCURLOPT_SSLVERSION.md: drop stray space from 'SSLv*', 'TLSv*'
Viktor Szakats [Mon, 22 Jun 2026 11:58:44 +0000 (13:58 +0200)] 
CURLOPT_SSLVERSION.md: drop stray space from 'SSLv*', 'TLSv*'

To match rest of codebase.

Closes #22131

5 weeks agopeer: fix ipv6 detection
Stefan Eissing [Mon, 22 Jun 2026 12:45:25 +0000 (14:45 +0200)] 
peer: fix ipv6 detection

When trying to detect ipv6 addresses, ipv4 addresses were also
flagged as ipv6.

Add test2413 to check.

Closes #22134

5 weeks agoappveyor: pass `--proto-redir =https` option
Viktor Szakats [Mon, 22 Jun 2026 10:45:44 +0000 (12:45 +0200)] 
appveyor: pass `--proto-redir =https` option

Follow-up to 500820682ce570f21586f567ddec4dbea4e6dad5 #21757

Closes #22130

5 weeks agosetopt: return error if received `curl_blob->data` is NULL
Viktor Szakats [Mon, 22 Jun 2026 09:34:10 +0000 (11:34 +0200)] 
setopt: return error if received `curl_blob->data` is NULL

To avoid dereferencing in the function if `CURL_BLOB_COPY` is set, or
outside of the function if unset.

Reported-by: netspacer.research
Closes #22129

5 weeks agolibssh2: drop stray double-negative from `strncmp()` result
Viktor Szakats [Mon, 22 Jun 2026 08:34:38 +0000 (10:34 +0200)] 
libssh2: drop stray double-negative from `strncmp()` result

Just a tidy-up. Logic remains identical.

Spotted by GitHub Code Quality

Follow-up to a867314f4fba0f05201226093335d75f3dbd0f3f #16382

Closes #22126

5 weeks agolibssh2: fix to return error code on missing parameter
Viktor Szakats [Mon, 22 Jun 2026 08:26:36 +0000 (10:26 +0200)] 
libssh2: fix to return error code on missing parameter

Reported by GitHub Code Quality

Follow-up to 0095f98464d85a3b2863d1c9ef7c5a71c9739450 #15250

Closes #22125

5 weeks agosetopt: cleanup the length check for COPYPOSTFIELDS handling
Daniel Stenberg [Mon, 22 Jun 2026 08:43:53 +0000 (10:43 +0200)] 
setopt: cleanup the length check for COPYPOSTFIELDS handling

Make it more straight-forward

Closes #22127

5 weeks agoHTTP3.md: update quiche build
Stefan Eissing [Fri, 19 Jun 2026 13:44:33 +0000 (15:44 +0200)] 
HTTP3.md: update quiche build

Fixes #22105
Reported-by: av223119 on github
Closes #22109

5 weeks agolibssh2: code and infof/trace cleanups
Stefan Eissing [Fri, 19 Jun 2026 08:59:05 +0000 (10:59 +0200)] 
libssh2: code and infof/trace cleanups

Give the libssh2 infof() messages a common format, add/clarify some to
make the connect/authentication flow more clear.

Closes #22101

5 weeks agodoh: stricter HTTPS RNAME parsing
Daniel Stenberg [Mon, 22 Jun 2026 07:10:15 +0000 (09:10 +0200)] 
doh: stricter HTTPS RNAME parsing

If any sublabel is longer than 63 octets, abort. This then also catches
compression attempts.

Verified in test 1658

Reported-by: netspacer.research
Closes #22124

5 weeks agodoh: cap the maximum TTL to 24 hours
Daniel Stenberg [Sun, 21 Jun 2026 21:32:09 +0000 (23:32 +0200)] 
doh: cap the maximum TTL to 24 hours

To avoid mistakes or abuse to cause problems. Many public DNS providers
cap their cache times to this.

Verify in test 1650

Reported-by: netspacer.research
Closes #22122

5 weeks agowebsockets: buffer ugprade data at connection level
Stefan Eissing [Fri, 19 Jun 2026 15:01:00 +0000 (17:01 +0200)] 
websockets: buffer ugprade data at connection level

When the HTTP Upgrade to websockets already carries ws frame data,
buffer that data at connection level and not in the ws decoder.

Adding new cfilter `cf_recvbuf` to buffer a fixed amont of data
to be received later. When the data is received, the filter
passes further recv call through to its subfilter.

Fixes #22107
Reported-by: sideshowbarker on github
Closes #22111

5 weeks agoproxy: fix automatic tunnel mode with "connect to host"
Michael Kaufmann [Fri, 19 Jun 2026 14:16:55 +0000 (16:16 +0200)] 
proxy: fix automatic tunnel mode with "connect to host"

Fix a regression in curl 8.21.0-rc3: Check whether the host and the "connect
to host" are equal before initializing the proxy. If they are equal, switching
to tunnel mode is not necessary.

Follow-up to 73daec6

Closes #22110

5 weeks agocd2nroff: handle TLS together with other protocols
Daniel Stenberg [Sun, 21 Jun 2026 22:27:22 +0000 (00:27 +0200)] 
cd2nroff: handle TLS together with other protocols

To render CURLOPT_KEYPASSWD properly

Closes #22123

5 weeks agosetopt: make CURLOPT_KEYPASSWD work for SSH-only builds
Daniel Stenberg [Sun, 21 Jun 2026 21:18:13 +0000 (23:18 +0200)] 
setopt: make CURLOPT_KEYPASSWD work for SSH-only builds

This option is used for both TLS and SSH so it needs to be handled
even in TLS-disabled builds

Mention this in the man page as well.

Follow-up to 52fa8d9
Pointed out by Codex Security
Closes #22121

6 weeks agoINSTALL-CMAKE.md: document CMake environment variables
Viktor Szakats [Sat, 20 Jun 2026 07:29:21 +0000 (09:29 +0200)] 
INSTALL-CMAKE.md: document CMake environment variables

Closes #22114