Commit graph

38743 commits

Author SHA1 Message Date
Max Dymond
dc8a87fc74 mailmap: cmeister2@gmail is primary for Max Dymond
I'd rather all my commits be attributed to cmeister2@gmail.com instead
of anything else; especially not my old Microsoft email address!

Closes #21735
2026-05-24 12:02:26 +02:00
Max Dymond
307cfd008b KNOWN_BUGS: remove stale Threads::Threads entry
The old CMake bug about exporting -lpthread instead of Threads::Threads
no longer matches current master. As of 2d546d239e
("cmake: use Threads::Threads imported target for POSIX Threads"),
the build now uses Threads::Threads and the generated CMake package
config resolves the dependency explicitly, so this KNOWN_BUGS entry is stale.

Closes #21734
2026-05-24 11:12:30 +02:00
Joshua Rogers
fc90bdbaf9 schannel: error on TLS 1.3-only with cipher list
The legacy SCHANNEL_CRED path cannot negotiate TLS 1.3. When TLS 1.3
is the only enabled protocol and a cipher list is set, fail instead of
silently downgrading to TLS 1.2.

Fixes https://github.com/curl/curl/issues/21702
Closes https://github.com/curl/curl/pull/21725
2026-05-22 11:22:15 -04:00
Jay Satiro
2ba0a0e41e CIPHERS.md: fix the example that uses only TLS 1.3
- Add --tls-max 1.3 to set the maximum version to TLS 1.3.

- Remove Schannel because it doesn't support TLS 1.3 ciphers since
  6238888.

Prior to this change the example set the minimum version to TLS 1.3 but
not the maximum version to TLS 1.3.

Ref: https://github.com/curl/curl/issues/21702

Closes https://github.com/curl/curl/pull/21719
2026-05-22 11:18:02 -04:00
Stefan Eissing
7b9613fa9b
ngtcp2: fail handshake directly
When certificate verification fails, error out of the handshake
callback, forcing ngtcp2 to stop processing the connection any further.

Closes #21712
2026-05-22 10:03:05 +02:00
Daniel Stenberg
f69405b38f
RELEASE-NOTES: synced 2026-05-22 09:48:59 +02:00
Stefan Eissing
bfbff7852f
http2: remove stream dependency tracking
The HTTP/2 feature is deprecated, few servers implement it and our
implementation is complicated by its state management. Make the two
CURLOPT_* involved a nop and deprecate them.

Closes #21723
2026-05-22 09:44:08 +02:00
11soda11
2056498625
KNOWN_BUGS.md: remove fixed GnuTLS <-> OpenSSL incompat bug
The entry is about GnuTLS not sending the client cert when it doesn't
match the `DN` the server requested.  OpenSSL does the opposite.

The issue was already fixed by #4958 and removed from KNOWN_BUGS,
but it was added back to the list by #16677, seemingly by mistake.

The issue is still fixed for GnuTLS >= 3.5.0.
As curl only supports GnuTLS >= 3.6.5, remove the bug entry from
KNOWN_BUGS.md

Fixes #21720
Closes #21722
2026-05-22 08:13:51 +02:00
Daniel Stenberg
7e350dd147
urlapi: fix redirect handling if CURLU_NO_GUESS_SCHEME is set
Verified by test 1967

Reported-by: Joshua Rogers
Closes #21721
2026-05-22 07:48:20 +02:00
Viktor Szakats
8e549fbdd3
GHA/checksrc: add auditor-level zizmor (warning-only)
CI time cost is 1s.

It may replace existing pedantic check, if this level isn't bringing
false-positives or annoyance. Officially it's not meant for CI, but curl
has been passing this in the last couple of months when checked locally.

Closes #21718
2026-05-21 22:17:34 +02:00
Viktor Szakats
bb5500a752
units: tidy up begin/end blocks
- use `UNITTEST_BEGIN_SIMPLE`/`UNITTEST_END_SIMPLE` where missing.
- drop redundant `(void)arg;` where using `UNITTEST_BEGIN*`.
- unit1636: drop redundant block after `UNITTEST_BEGIN*`.
- unit1609: fix typo in comment.
- unit1627: merge to `if`s.

Closes #21715
2026-05-21 17:28:38 +02:00
Viktor Szakats
a076f821e1
multi: silence gcc 16 -Wnull-dereference, bump CI job to test
- GHA/windows: bump dl-mingw job from gcc 15 to 16.

- multi: silence warning while building libcurlu:
  ```
  In function 'multi_ischanged',
      inlined from 'multi_socket.isra' at D:/a/curl/curl/lib/multi.c:3282:6:
  D:/a/curl/curl/lib/multi.c:1710:17: error: null pointer dereference [-Werror=null-dereference]
   1710 |   bool retval = (bool)multi->recheckstate;
        |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
  D:/a/curl/curl/lib/multi.c:1712:25: error: null pointer dereference [-Werror=null-dereference]
   1712 |     multi->recheckstate = FALSE;
        |                         ^
  ```
  Ref: https://github.com/curl/curl/actions/runs/26217071531/job/77142119137?pr=21707

- multi: silence another `-Wnull-dereference`, popping up in libcurl
  with gcc 13 after the previous silencing:
  ```
  In function 'Curl_multi_xfers_running',
      inlined from 'multi_socket.isra' at ../../lib/multi.c:3292:28:
  ../../lib/multi.c:4132:15: error: null pointer dereference [-Werror=null-dereference]
   4132 |   return multi->xfers_alive;
        |          ~~~~~^~~~~~~~~~~~~
  ```
  Ref: https://github.com/curl/curl/actions/runs/26218822231/job/77148186045

- multi: also add `DEBUGASSERT(multi)` to the two updated functions.

Closes #21707
2026-05-21 15:16:21 +02:00
Viktor Szakats
64c51ad178
cmake: opt in MSVC_VERSION 1951 to picky warnings
Closes #21714
2026-05-21 15:16:21 +02:00
Viktor Szakats
b0239417b3
GHA/windows: bump windows-2025 runners to windows-2025-vs2026
To silence:
```
NOTICE: windows-2025 requests are being redirected to windows-2025-vs2026 by June 15, 2026
```

Closes #21713
2026-05-21 14:57:05 +02:00
Viktor Szakats
c583e825f7
GHA: simplify boolean if comparisons
Closes #21709
2026-05-21 14:13:52 +02:00
Viktor Szakats
af511a22cb
test1185: fix to previous commit
Follow-up to 419b1c0b75 #21703
2026-05-21 11:24:30 +02:00
Viktor Szakats
419b1c0b75
checksrc: detect curlx_safefree() opportunities
Follow-up to bcd0497c81 #21700
Follow-up to 1c3289c85e #21684
Follow-up to c0f0e400e0 #5968
Follow-up to 0f4a03cbb6

Closes #21703
2026-05-21 11:07:34 +02:00
Joshua Rogers
f2692b54f7
docs: note CURLOPT_PINNEDPUBLICKEY has no effect on legacy LDAP backend
Closes #21682
2026-05-21 08:08:25 +02:00
Viktor Szakats
bcd0497c81
tidy-up: use curlx_safefree()
Closes #21700
2026-05-21 01:31:03 +02:00
Dan Fandrich
d3b04e5600 tests: add an assert to avoid IPC blocking
If so much data is being sent over the internal IPC pipe that the pipe
buffer fills and the syscall blocks, the program will hang. Add an
assert to ensure that this limit is never reached. The buffer size is
going to be different on different platforms, so choose 1KB which is
likely to be a reasonable lower bound on just about any system.
Currently, the maximum amount ever written is <100 bytes, so this should
provide plenty of headroom.

Spotted by Codex Security

Closes #21688
2026-05-20 11:32:38 -07:00
Joshua Rogers
cce4d3b0ed schannel: fix revoke_best_effort setting for proxy
- Fix revoke_best_effort reading wrong ssl config.

Prior to this change the revoke_best_effort setting for the proxy was
wrongly ignored in favor of the same setting for the destination host.

In other words, CURLSSLOPT_REVOKE_BEST_EFFORT set via
CURLOPT_PROXY_SSL_OPTIONS did not apply to the proxy and
CURLSSLOPT_REVOKE_BEST_EFFORT set via CURLOPT_SSL_OPTIONS wrongly
applied to the proxy.

Closes https://github.com/curl/curl/pull/21683
2026-05-20 13:51:35 -04:00
Stefan Eissing
5e4e62962c cfilters: fix busy loop on blocked transfers
When a transfer gets paused after the connection has been established,
any data sitting in the kernel socket buffers will no longer get read.

Prevent the sockets form being added to the pollsets, because they
will trigger POLLIN endlessly and cause a busy poll loop. Same in event
based processing.

Reported-by: Harry Sintonen

Fixes https://github.com/curl/curl/issues/21671
Closes https://github.com/curl/curl/pull/21675
2026-05-20 13:51:34 -04:00
penpal
ba7b65f957 sspi: clear SSPI credentials on AcquireCredentialsHandle failure
- Clear credentials on AcquireCredentialsHandle failure so it is not
  used on a subsequent call.

SSPI initialization may evaluate the credentials pointer to determine
whether or not a prior call to AcquireCredentialsHandle was successful,
therefore we must clear it on a failed call.

Closes https://github.com/curl/curl/pull/21642
2026-05-20 13:51:33 -04:00
Viktor Szakats
c30db7b6be
cmake: quote COMPONENTS string in curl-config.in.cmake
For consistency and for handling an accidental empty more gracefully.

Follow-up to 7d546e52b2 #21540

Closes #21699
2026-05-20 19:24:50 +02:00
Daniel Stenberg
88c7e16cce
setopt: clear proxy auth properly on NULL
Verify NULLed proxy credentials with test1648

Closes #21696
2026-05-20 15:54:41 +02:00
Viktor Szakats
f902c3c486
Dockerfile: fix typo in variable name
Did not cause an actual issue.

Spotted by GitHub Code Quality

Follow-up to 41c03b4c98 #13250

Closes #21693
2026-05-20 13:01:56 +02:00
Viktor Szakats
76e1da0989
GHA/non-native: drop DragonFlyBSD job, due to unreliable package repo updates
Example:
```
Wed, 20 May 2026 09:51:48 GMT Updating Avalon repository catalogue...
Wed, 20 May 2026 09:51:48 GMT pkg: An error occurred while fetching package: No error
Wed, 20 May 2026 09:51:48 GMT pkg: An error occurred while fetching package: No error
Wed, 20 May 2026 09:51:48 GMT repository Avalon has no meta file, using default settings
Wed, 20 May 2026 09:51:48 GMT pkg: An error occurred while fetching package: No error
Wed, 20 May 2026 09:51:48 GMT pkg: An error occurred while fetching package: No error
Wed, 20 May 2026 09:51:48 GMT pkg: An error occurred while fetching package: No error
Wed, 20 May 2026 09:51:48 GMT pkg: An error occurred while fetching package: No error
Wed, 20 May 2026 09:51:48 GMT Unable to update repository Avalon
Wed, 20 May 2026 09:51:48 GMT Error updating repositories!
Wed, 20 May 2026 09:51:48 GMT Error: Process completed with exit code 3.
```

As tested over at libssh2, retrying the install command also does not
help, only repeats the same failure.

Also: fix whitespace in matrix.

Follow-up to b158d1c9f7 #21681

Closes #21694
2026-05-20 13:01:56 +02:00
Joshua Rogers
edfc80c7c4
urlapi: compare zone-id in Curl_url_same_origin()
Closes #21686
2026-05-20 11:53:29 +02:00
Stefan Eissing
77e4e5b86d
websockets: auto-tunnel through http proxy
When using a ws: or wss: url with a http proxy, automatically
switch to tunneling operation mode.

Add test_20_10 to check.

Fixes #21663
Closes #21691
2026-05-20 11:50:35 +02:00
Viktor Szakats
b158d1c9f7
GHA/non-native: move BSDs to a single matrix, add DragonFly and Midnight
- bump cross-platform-actions to v1.1.0.
  Ref: https://github.com/cross-platform-actions/action/releases/tag/v1.1.0

- merge BSD jobs into a single matrix.

- split BSD jobs into build steps as used for other platforms.
  A new feature of cross-platform-actions v1.1.0.

- sync BSD build steps with other platforms.

- add DragonFlyBSD and MidnightBSD to the BSD matrix.
  New features of cross-platform-actions v1.1.0.
  MidnightBSD uses GnuTLS to add variation, also the preinstalled
  OpenSSL is too old (v1.1.1w) for curl.
  Stick with autotools for DragonFlyBSD; I could not figure out how
  to install cmake.
  Refs:
  https://en.wikipedia.org/wiki/DragonFly_BSD
  https://en.wikipedia.org/wiki/MidnightBSD

- bump Intel FreeBSD jobs from v14.3 to v15.0.

- fix to show `gcc` in the NetBSD job name.

All these saved 50 lines of YAML. The two new jobs take 2m15s each. The
bump to FreeBSD 15 needs and extra minute in total.

Note, the DragonFlyBSD job seems to have reliability issues. If it
remains an issue, I'll comment it out or delete it in a future commit.

Closes #21681
2026-05-20 03:19:02 +02:00
renovate[bot]
25a70e18c1
Dockerfile: update debian:bookworm-slim Docker digest to 0104b33
Closes #21687
2026-05-20 03:19:02 +02:00
Viktor Szakats
68e0b13209
runner.pm: apply minor correctness fix
"Lines 244-245 overwrite global variables `$runnerr` and `$runnerw` that
were already assigned in the child process (lines 205-206). In the
parent process context, these assignments appear incorrect and could
cause issues if `runner_init` is called multiple times. The parent
should only store references in the controller hashes."

It could never cause an actual issue, but clarifies the intent of the
code.

Spotted and fixed by GitHub Code Quality

Cherry-picked from #21646

Closes #21672
2026-05-20 03:14:26 +02:00
Viktor Szakats
b3f76b21c9
tidy-up: miscellaneous
- fix typos and wording in documentation and comments.
- KNOWN_BUGS: merge duplicate H1 section.
- test_10_proxy: delete stray expressions.
- Perl: `while()` -> `while(1)`.
- Perl: fix indent, whitespace, drop redundant quotes and parentheses.
- fix casing: URL, SSL, Windows.
- badwords: readd `threadsafe`, add `well-known` (and fix it).
- replace `WinXP` -> `Windows XP` to match other uses.

Closes #21646
2026-05-20 00:50:43 +02:00
Viktor Szakats
1c3289c85e
unit3303, unit3304: tidy-ups
- use `curlx_safefree()`.
- drop redundant blocks.

Follow-up to 7541ae569d #21667

Closes #21684
2026-05-20 00:48:54 +02:00
Joshua Rogers
7541ae569d
tls: fix incomplete mTLS config in conn reuse and session cache
cert_type, key, key_type, key_passwd and key_blob lived in
ssl_config_data but not in ssl_primary_config, so they were invisible to
match_ssl_primary_config() and to the TLS session cache peer key.

Two easy handles sharing a connection pool could reuse each other's
authenticated connections when they differed only on SSLKEY, SSLKEYTYPE,
KEYPASSWD, SSLCERTTYPE or SSLKEYBLOB. The second handle would silently
inherit the first handle's authenticated identity.

Promote all five fields into ssl_primary_config so the conn-reuse
predicate and session cache key cover the complete client credential
set. Also replace the fixed ":CCERT" session cache marker with the
actual clientcert path so sessions are not shared across different
client certificates.

Verified by test 3303 and 3304

Reported-By: Joshua Rogers (AISLE Research)
Closes #21667
2026-05-20 00:02:33 +02:00
Viktor Szakats
a4dca608e1
GHA/non-native: alpha-sort BSD jobs
Closes #21680
2026-05-19 19:03:58 +02:00
Daniel Stenberg
5c225384b8
url: detect proxy changes read from environment
When a proxy is set from an environment variable, detect if that proxy
is not the same as previously and flush state.

Verified by test1647: verify changing proxy with env variables and make
sure Digest state is flushed in the second use

Closes #21666
2026-05-19 17:14:16 +02:00
Viktor Szakats
d99dcfb04a
BUFQ.md: re-sync with source code
Also:
- move bullet points out from C code fences.
- fold long lines.

Follow-up to d4983ffc13 #17396

Closes #21678
2026-05-19 16:55:45 +02:00
Viktor Szakats
000de81fb1
tidy-up: rename more CURLcode variables to result
Follow-up to 885b553545 #21348

Closes #21676
2026-05-19 16:55:45 +02:00
Viktor Szakats
1fb734bc2d
docs: tidy-up scheme references
After this patch `://` schemes are lowercase and enclosed in backticks.

Also:
- docs/libcurl/libcurl-multi.md: drop a stray C code fence.
- docs/libcurl/libcurl-tutorial.md: replace single/double quotes with
  Markdown markup where applicable.

Ref: #21646

Closes #21674
2026-05-19 16:55:45 +02:00
Viktor Szakats
a7bfbc09d4
unit1304: use enum type and values, rename result to res
Ref: #21646

Closes #21673
2026-05-19 16:55:45 +02:00
Viktor Szakats
6999ccb8e0
managen: apply minor fixes and improvements
- replace `goto` with `while` loop.
- fix newlines in a warning message.
- handle open error for `curl/curlver.h` header.

Ref: #21646

Closes #21670
2026-05-19 16:55:45 +02:00
Joshua Rogers
81da4ee249
vtls: use Curl_safecmp for CRLfile and pinned_key comparison
Both are filesystem paths (or case-sensitive hash strings for
pinned_key). curl_strequal is case-insensitive and would treat
/etc/ssl/Crl.pem and /etc/ssl/crl.pem as the same file, unlike the other
path fields (CApath, CAfile, issuercert, clientcert) which already use
Curl_safecmp.

Closes #21668
2026-05-19 15:10:47 +02:00
Dan Fandrich
d24652971a docs/libcurl: fix the version for curl_multi_socket_action
It was added in 7.16.3, not 7.15.4 (that's when curl_multi_socket was
added).
2026-05-18 22:34:05 -07:00
Shintomon Mathew
38cd720f76
creds: mask OAuth bearer token in trace logs
Masked OAuth bearer tokens in credential trace output by emitting ***
when a bearer token is present, matching the existing password redaction
behavior and preventing sensitive token disclosure in verbose/debug
logs.

Closes #21659
2026-05-18 23:53:41 +02:00
Daniel Stenberg
b190c803e3
test1588: use %TESTNUMBER, not hard-coded number
Closes #21662
2026-05-18 23:52:45 +02:00
Daniel Stenberg
64824e439d
VULN-DISCLOSURE-POLICY.md: test code is not secure
Don't tell us about it

Closes #21660
2026-05-18 16:19:06 +02:00
Daniel Stenberg
9107e8ba98
curl_easy_pause.md: rephrase the stream cache when pause clause
- mention HTTP/3
- it is 10 MB per stream these days

Closes #21658
2026-05-18 15:51:08 +02:00
Daniel Stenberg
7ca5f939c8
test1646: netrc parsing without user match but user in URL
Follow-up to 4ae1d7cc26
2026-05-18 15:19:22 +02:00
Stefan Eissing
4ae1d7cc26
netrc: scanner refactor
Refactor the netrc scanner. Add test case for checking that the last
matched machine with unmatched login does not return the password as
success (unit1304).

Closes #21624
2026-05-18 15:18:09 +02:00