]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 weeks agotidy-up: drop stray casts for allocated pointers
Viktor Szakats [Thu, 4 Jun 2026 23:23:06 +0000 (01:23 +0200)] 
tidy-up: drop stray casts for allocated pointers

Closes #21865

2 weeks agolibssh2: sync version check with INTERNALS.md
Viktor Szakats [Fri, 5 Jun 2026 03:09:45 +0000 (05:09 +0200)] 
libssh2: sync version check with INTERNALS.md

Follow-up to cf3b9657bcb7acd3525ca081b4ed16e860604d6d

Closes #21868

2 weeks agolibssh2: do not use deprecated macros when unavailable
Viktor Szakats [Fri, 5 Jun 2026 00:45:53 +0000 (02:45 +0200)] 
libssh2: do not use deprecated macros when unavailable

To support building with `LIBSSH2_NO_DEPRECATED` macro defined, a future
libssh2 that may have dropped these macros.

Ref: https://github.com/libssh2/libssh2/pull/1977

Closes #21867

2 weeks agolibssh2: use non-deprecated `libssh2_knownhost_addc()`
Viktor Szakats [Fri, 5 Jun 2026 00:35:58 +0000 (02:35 +0200)] 
libssh2: use non-deprecated `libssh2_knownhost_addc()`

Supported since libssh2 v1.2.5. Replacing `libssh2_knownhost_add()`,
which was deprecated in that same version.

The new API supports a comment field.

Ref: https://github.com/libssh2/libssh2/pull/1977

Closes #21866

2 weeks agoquic: count zero length packets against max
Stefan Eissing [Fri, 5 Jun 2026 06:34:46 +0000 (08:34 +0200)] 
quic: count zero length packets against max

With a flood of zero lenght UDP packets to curl, the receive loop might
run longer than intended to. Count such packets against the max to
terminate the loop as intended.

URL: https://hackerone.com/reports/3783438
Reported-by: vectorqueue on hackerone
Closes #21869

2 weeks agoVULN-DISCLOSURE-POLICY.md: emphasize comm as a human
Daniel Stenberg [Fri, 5 Jun 2026 06:58:14 +0000 (08:58 +0200)] 
VULN-DISCLOSURE-POLICY.md: emphasize comm as a human

Closes #21870

2 weeks agoBINDINGS: Update Hollywood link
Andreas Falkenhahn [Wed, 3 Jun 2026 21:03:51 +0000 (23:03 +0200)] 
BINDINGS: Update Hollywood link

- Change link from archive.org back to hollywood-mal.com since the site
  is up and running.

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

2 weeks agotests: add `cookies` feature to some tests 21858/head
Marcel Raad [Wed, 3 Jun 2026 06:58:08 +0000 (08:58 +0200)] 
tests: add `cookies` feature to some tests

These fail without cookie support.

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

2 weeks agotop-complexity: drop threshold to 50
Daniel Stenberg [Wed, 3 Jun 2026 08:42:26 +0000 (10:42 +0200)] 
top-complexity: drop threshold to 50

Closes #21857

2 weeks agourlapi: simplify urlget_url somewhat
Daniel Stenberg [Wed, 3 Jun 2026 08:20:02 +0000 (10:20 +0200)] 
urlapi: simplify urlget_url somewhat

- make file_url() a separate function that returns a file:// URL
- group the checks that need scheme info

Closes #21856

2 weeks agotool_parsecfg: refactor parseconfig()
Daniel Stenberg [Wed, 3 Jun 2026 07:43:41 +0000 (09:43 +0200)] 
tool_parsecfg: refactor parseconfig()

- introduce helper functions
- remove #ifdef'ed debug code

Closes #21855

2 weeks agocookie: refactor parse_cookie_header
Daniel Stenberg [Wed, 3 Jun 2026 06:10:14 +0000 (08:10 +0200)] 
cookie: refactor parse_cookie_header

- introduce a few static helper functions
- simplify the bad octet checks
- simplify the too long cookie/value check

Closes #21854

2 weeks agoGHA: bump 2 GitHub Actions
dependabot[bot] [Tue, 2 Jun 2026 20:20:31 +0000 (20:20 +0000)] 
GHA: bump 2 GitHub Actions

- updates `actions/labeler` from 6.0.1 to 6.1.0
- updates `github/codeql-action` from 4.35.2 to 4.36.0

Closes #21852

2 weeks agovquic: moving related things into subdir
Stefan Eissing [Tue, 2 Jun 2026 11:27:22 +0000 (13:27 +0200)] 
vquic: moving related things into subdir

Move QUIC related implementations into the vquic directory. Rename
files that implement a connection filter accordingly.

Closes #21848

2 weeks agohsts.md: mention multiple curl invokes effect
Daniel Stenberg [Tue, 2 Jun 2026 15:40:48 +0000 (17:40 +0200)] 
hsts.md: mention multiple curl invokes effect

Reported-by: zhanhb on github
Ref: #21847
Closes #21851

2 weeks agogtls: minor fixes and improvements
Viktor Szakats [Tue, 2 Jun 2026 13:33:14 +0000 (15:33 +0200)] 
gtls: minor fixes and improvements

- fix GnuTLS function name reference in `Curl_gtls_shared_creds_create()`
  error message.
  Spotted by GitHub Code Quality.
- unfold a line.
- in `Curl_gtls_verifyserver()`:
  - report the failure of `gnutls_x509_crt_import()`.
    Spotted by GitHub Code Quality.
  - fix a minor inconsistency in error strings.
  - drop redundant NULL checks for `config->issuercert`.

Closes #21850

2 weeks agoschannel: use fopen instead CreateFile
Vasiliy-Kkk [Wed, 27 May 2026 12:40:13 +0000 (15:40 +0300)] 
schannel: use fopen instead CreateFile

- Refactor CA file reading to use the typical fopen/fread instead of
  CreateFile/ReadFile.

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

2 weeks agogithub: Add AI usage warning to issue, doc and PR templates
Jay Satiro [Thu, 28 May 2026 18:42:03 +0000 (14:42 -0400)] 
github: Add AI usage warning to issue, doc and PR templates

- Explain to contributors that though AI use is acceptable they must
  not file unless they can understand and explain their work without AI.

Assisted-by: Viktor Szakats
Ref: https://github.com/curl/curl/discussions/21792

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

2 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 2 Jun 2026 15:01:32 +0000 (17:01 +0200)] 
RELEASE-NOTES: synced

2 weeks agotidy-up: use test/example domains more
Viktor Szakats [Tue, 2 Jun 2026 11:51:35 +0000 (13:51 +0200)] 
tidy-up: use test/example domains more

Closes #21849

2 weeks agogtls: verify OCSP response signature in gtls_verify_ocsp_status
Joshua Rogers [Tue, 19 May 2026 13:54:30 +0000 (15:54 +0200)] 
gtls: verify OCSP response signature in gtls_verify_ocsp_status

Since aeb1a281ca ("gtls: fix OCSP stapling management"), the function
parses the stapled OCSP response and reads the certificate status via
gnutls_ocsp_resp_get_single(), but never calls gnutls_ocsp_resp_verify()
or gnutls_ocsp_resp_verify_direct(). A response with a forged or
corrupted signature is accepted without question.

Fix by calling gnutls_ocsp_resp_verify() against the trust list obtained
from the session credentials immediately after gnutls_ocsp_resp_import().
This handles both directly-signed responses and delegated OCSP responders
without requiring the issuer certificate to be present in the peer chain.

The missing check only affects the CURLOPT_SSL_VERIFYSTATUS code path
when CURLOPT_SSL_VERIFYPEER is disabled. With peer verification enabled,
gnutls_certificate_verify_peers2() independently catches the invalid
response via GNUTLS_CERT_INVALID_OCSP_STATUS before
gtls_verify_ocsp_status() is reached. As a result, no attack is possible
that is not already trivially achievable without OCSP stapling when peer
verification is off. This is a correctness and consistency fix, not a
security vulnerability.

Reported-by: Joshua Rogers
Closes #21677

2 weeks agotelnet: honor CURLOPT_TIMEOUT in send_telnet_data()
Joshua Rogers [Tue, 19 May 2026 22:37:27 +0000 (00:37 +0200)] 
telnet: honor CURLOPT_TIMEOUT in send_telnet_data()

The poll-before-write loop used -1 (infinite) as the Curl_poll timeout,
so a peer that stops reading could stall the transfer indefinitely,
bypassing CURLOPT_TIMEOUT. Use Curl_timeleft_ms() instead and return
CURLE_OPERATION_TIMEDOUT when the deadline is reached or exceeded.

Closes #21685

2 weeks agolib1560: verify a few more URL variations
Daniel Stenberg [Tue, 2 Jun 2026 08:58:15 +0000 (10:58 +0200)] 
lib1560: verify a few more URL variations

Closes #21842

2 weeks agoKNOWN_BUGS: Digest does not care for 'domain'
Daniel Stenberg [Tue, 2 Jun 2026 06:31:00 +0000 (08:31 +0200)] 
KNOWN_BUGS: Digest does not care for 'domain'

Room for improvement.

Closes #21838

2 weeks agoURL-SYNTAX: document more URL parsing details
Daniel Stenberg [Tue, 2 Jun 2026 08:56:37 +0000 (10:56 +0200)] 
URL-SYNTAX: document more URL parsing details

- IPv4 numerical address
- IPv6 numerical address + zone id mention
- No IPvFuture support
- Some path parsing details

Closes #21841

2 weeks agoos400sys: fix theoretical length overflows
Viktor Szakats [Tue, 2 Jun 2026 07:10:44 +0000 (09:10 +0200)] 
os400sys: fix theoretical length overflows

When converting a `size_t` to `unsigned int`.

Another instance spotted by Copilot.

Reported-by: Gao Liyou
Ref: #21825
Closes #21840

2 weeks agotool_operhlp: avoid NULL to %s
Daniel Stenberg [Tue, 2 Jun 2026 06:10:47 +0000 (08:10 +0200)] 
tool_operhlp: avoid NULL to %s

If the filename allocation fails.

Reported-by: Gao Liyou
Ref: #21825
Closes #21836

2 weeks agotool_help: rectify a bad assert
Daniel Stenberg [Tue, 2 Jun 2026 06:18:53 +0000 (08:18 +0200)] 
tool_help: rectify a bad assert

The condition was wrong, and now it also verifies 'tlen'.

Reported-by: Gao Liyou
Ref: #21825
Closes #21837

2 weeks agoMakefile.am: drop test1190 listed twice
Viktor Szakats [Tue, 2 Jun 2026 06:31:40 +0000 (08:31 +0200)] 
Makefile.am: drop test1190 listed twice

Spotted by GitHub Code Quality

Closes #21839

2 weeks agocfilters: remove close method
Stefan Eissing [Mon, 1 Jun 2026 13:31:40 +0000 (15:31 +0200)] 
cfilters: remove close method

closing a filter chain and reconnecting it again is a complication
that only the HTTP/1.x proxy filter used. Remove it from all filters.

Instead, a filter can return CURLE_AGAIN during the connect phase
and the cf-setup filter will tear down all "sub filters" and restart
over.

With this, a filter never resets to the initial phase but progresses
through connect -> connected -> shutdown -> destroy once.

Closes #21831

2 weeks agohttp: prefer chunked encoding over Content-Length: 0
Josef Cejka [Wed, 20 May 2026 16:07:16 +0000 (18:07 +0200)] 
http: prefer chunked encoding over Content-Length: 0

Call http_size() before checking the request for empty body to prefer
Transfer-Encoding: chunked even if Content-Length is 0.

Closes #21706

2 weeks agolib505: tidy up slist pointer use
Viktor Szakats [Mon, 1 Jun 2026 21:12:56 +0000 (23:12 +0200)] 
lib505: tidy up slist pointer use

Bring code closer to `curl_slist_append()` man page and clarify variable
names.

Closes #21835

2 weeks agocapsule: include `arpa/inet.h` for `ntohs()` declaration
Randall S. Becker [Mon, 1 Jun 2026 20:18:00 +0000 (21:18 +0100)] 
capsule: include `arpa/inet.h` for `ntohs()` declaration

Some platforms require inclusion of arpa/inet.h in order to use ntohs().

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21834

2 weeks agounits: drop redundant pointer check and workaround
Viktor Szakats [Sun, 31 May 2026 23:29:14 +0000 (01:29 +0200)] 
units: drop redundant pointer check and workaround

All users of the `verify_memory()` macro used a fixed-length buffer for
the test output, which then needed a workaround to silence GCC
`-Waddress` warnings.

```
tests/unit/unit1615.c: In function 'test_unit1615':
tests/libtest/unitcheck.h:51:8: error: the address of 'output_buf' will always evaluate as 'true' [-Werror=address]
   51 |     if((dynamic) && memcmp(dynamic, check, len)) {                          \
      |        ^
tests/unit/unit1615.c:114:3: note: in expansion of macro 'verify_memory'
  114 |   verify_memory(output_buf, precomp_hash1, CURL_SHA512_256_DIGEST_LENGTH);
      |   ^~~~~~~~~~~~~
```

Drop redundant address check and the workarounds with it.

Closes #21833

2 weeks agobuild: say Quiche support is experimental, where missing
Viktor Szakats [Mon, 1 Jun 2026 16:53:20 +0000 (18:53 +0200)] 
build: say Quiche support is experimental, where missing

Follow-up to f2183f51b6651dae759164d064c62fa075d8f695 #21795

Closes #21832

2 weeks agotidy-up: miscellaneous
Viktor Szakats [Thu, 28 May 2026 21:50:52 +0000 (23:50 +0200)] 
tidy-up: miscellaneous

- drop more uses of the word "just". (not enforced here)
- drop some uses of the "will" word.
- "then" -> "than".
- tests/http/testenv/curl.py: fix copy-paste typo in error message.
- pytest: replace `shutdownh` with `shutdown` in test names.
  Spotted by GitHub Code Quality.
- comment typos.
- whitespace and newlines fixes.

Closes #21830

2 weeks agocf-setup: improve readability
Stefan Eissing [Mon, 1 Jun 2026 12:23:30 +0000 (14:23 +0200)] 
cf-setup: improve readability

Restructure the code in cf-setup connect to make it better readable what
is happening for establishing the connection's filter chain.

Closes #21827

2 weeks agosetopt: CURLOPT_MAXCONNECTS set to 0 restores default value
Daniel Stenberg [Mon, 1 Jun 2026 14:01:17 +0000 (16:01 +0200)] 
setopt: CURLOPT_MAXCONNECTS set to 0 restores default value

Closes #21829

2 weeks agodata creds: detect change
Stefan Eissing [Tue, 26 May 2026 13:01:09 +0000 (15:01 +0200)] 
data creds: detect change

Reshuffle code a little to detect when the transfer's credentials
actually change. Otherwise, leave the existing creds in place.

This gives the precise location where we may want to reset other
states that become invalid with change credentials. Also, by
keeping a creds instance as long as it is valid, we can associate
meta data with it.

Closes #21755

2 weeks agosetopt: defref the old referer when setting a new
Daniel Stenberg [Mon, 1 Jun 2026 11:31:11 +0000 (13:31 +0200)] 
setopt: defref the old referer when setting a new

Closes #21826

2 weeks agobadwords: exclude wordlist input file from search
Viktor Szakats [Sun, 31 May 2026 20:47:54 +0000 (22:47 +0200)] 
badwords: exclude wordlist input file from search

To avoid hitting all lines in it. It doesn't happen in curl at the
moment, but may happen in the future or in other projects using this
script.

Closes #21819

2 weeks agocmake: add basic way to select pytests to run
Viktor Szakats [Sun, 31 May 2026 18:44:57 +0000 (20:44 +0200)] 
cmake: add basic way to select pytests to run

Not documented and experimental, example:
`-D_CURL_PYTEST=/test_60_h3_proxy.py`

Ideally, this should be an env like `TFLAGS` and it should allow
selecting any test ID or a group of them, but so far could not figure
out how even a basic env could work.

Closes #21818

2 weeks agopytest: pass `--disable` to curl
Viktor Szakats [Sun, 31 May 2026 16:31:17 +0000 (18:31 +0200)] 
pytest: pass `--disable` to curl

To avoid a local `.curlrc` interfering with tests.

Closes #21816

2 weeks agopytest: fixes and tidy-ups to h3-proxy tests
Viktor Szakats [Sat, 30 May 2026 08:53:21 +0000 (10:53 +0200)] 
pytest: fixes and tidy-ups to h3-proxy tests

- merge tests into a single class.
  For shorter names, to fix sort order by test number, and to align with
  other tests.
- fix preconditions to make `test_60_04_guard_proxy_http3_unsupported`
  actually run.
- replace local precondition with constant of the same effect.
- drop redundant non-`ngtcp2` requirement for
  `test_60_04_guard_proxy_http3_unsupported`.
  (seemed relevant for no longer supported openssl-quic builds.)
- drop unused `NGTCP2_ONLY_MSG` constant.
  Follow-up to e4139a73c82d2035142f5ae36196adb4e9831dae #21798
- avoid creating unnecessary test data blobs, and minimize their scopes.

Follow-up to 91facd7bb3bb366525b7cb41221f6359c5e936db #21791
Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21811

2 weeks agolib1560: drop unused variable 'url' rc-8_21_0-1
Daniel Stenberg [Mon, 1 Jun 2026 06:55:37 +0000 (08:55 +0200)] 
lib1560: drop unused variable 'url'

Spotted by Copilot

Closes #21821

2 weeks agovtls_config: adjust to origin
Stefan Eissing [Wed, 20 May 2026 11:25:49 +0000 (13:25 +0200)] 
vtls_config: adjust to origin

When a transfer goes against another origin than the initial one, do not
add the following to the ssl configuration: client cert, client key, srp
user/pass, pinned key.

Closes #21695

2 weeks agoRevert "tool: add a retry delay for transfers to same origin on 429"
Daniel Stenberg [Mon, 1 Jun 2026 07:15:50 +0000 (09:15 +0200)] 
Revert "tool: add a retry delay for transfers to same origin on 429"

This reverts commit c5fb460e7c7a57bf3e3a985d10a8b175bbd61500.

This needs some further work before we can do this.

Fixes #21822
Closes #21824

2 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 1 Jun 2026 06:50:11 +0000 (08:50 +0200)] 
RELEASE-NOTES: synced

2 weeks agotool: add a retry delay for transfers to same origin on 429
htasta [Fri, 17 Apr 2026 10:35:33 +0000 (12:35 +0200)] 
tool: add a retry delay for transfers to same origin on 429

Closes #21355

2 weeks agourlapi: accept 0X prefix in IPv4 address as well
Daniel Stenberg [Sun, 31 May 2026 21:23:45 +0000 (23:23 +0200)] 
urlapi: accept 0X prefix in IPv4 address as well

Extend test 1560 accordingly

Closes #21820

2 weeks agourlapi: drop base fragment on empty redirect
tiymat [Wed, 27 May 2026 02:02:32 +0000 (23:32 -0230)] 
urlapi: drop base fragment on empty redirect

Extended test 1560 to verify

Fixes #21745
Closes #21763

2 weeks agourl: connection reuse fixes for starttls
Stefan Eissing [Tue, 19 May 2026 08:57:53 +0000 (10:57 +0200)] 
url: connection reuse fixes for starttls

Add test_31_13 to check connection reuse on mixed --ssl-reqd setting.
For that add debug env var CURL_DBG_NO_USE_SSL_ON_FIRST to disable
--ssl-reqd for the first url. Check that the connection without SSL
from the first url is not reused on the second URL that requires it.

Tweak special ftp: protocol check to fail a DEBUGASSERT on mismatched
`use_ssl` settings as that should have been caught before in the
connection reuse matching (imap/smtp etc. do not have this extra check
and rely on the general part doing its job).

Closes #21665

2 weeks agobadwords: prefer 'workaround' (without hyphen)
Viktor Szakats [Fri, 29 May 2026 11:39:48 +0000 (13:39 +0200)] 
badwords: prefer 'workaround' (without hyphen)

Closes #21807

2 weeks agoGHA: update dependency ngtcp2/ngtcp2 to v1.23.0
renovate[bot] [Sun, 31 May 2026 12:18:28 +0000 (12:18 +0000)] 
GHA: update dependency ngtcp2/ngtcp2 to v1.23.0

Closes #21815

2 weeks agoscorecard: add support for http: testing
Stefan Eissing [Fri, 29 May 2026 09:06:58 +0000 (11:06 +0200)] 
scorecard: add support for http: testing

Add option `--http-plain` to test against httpd without
using TLS.

Closes #21805

2 weeks agoGHA: update dependency ngtcp2/nghttp3 to v1.16.0
renovate[bot] [Sun, 31 May 2026 08:46:34 +0000 (08:46 +0000)] 
GHA: update dependency ngtcp2/nghttp3 to v1.16.0

Closes #21814

3 weeks agoh3-proxy: disable frequently failing pytests
Viktor Szakats [Thu, 28 May 2026 20:37:40 +0000 (22:37 +0200)] 
h3-proxy: disable frequently failing pytests

- test_60_02_connect_tunnel_fail[fail_h1_over_h3_proxytunnel]
- test_60_02_connect_tunnel_fail[fail_h3_over_h2_proxytunnel]
- test_60_02_connect_tunnel_fail[fail_h3_over_h3_proxytunnel]
- test_60_03_h3_target_auto_connect_udp[proxy_h3]
- test_60_15_connect_timeout

Further flaky ones may be disabled in future commits.
All to be re-enabled after stabilizing them.

Follow-up to 59213f8248cfc10e97a6a23f5e4da9b1e5057400 #21789
Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21803

3 weeks agoh3-proxy: fix callback return values, and a typo in tests
Viktor Szakats [Thu, 28 May 2026 20:22:32 +0000 (22:22 +0200)] 
h3-proxy: fix callback return values, and a typo in tests

- replace literal -1 with `NGHTTP3_ERR_CALLBACK_FAILURE` in nghttp3
  callback.
- replace `NGHTTP3_ERR_CALLBACK_FAILURE` with
  `NGTCP2_ERR_CALLBACK_FAILURE` in ngtcp2 callbacks.
- test_60_h3_proxy: fix non-critical typo in symbol.

Spotted by GitHub Code Quality

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21802

3 weeks agohttp: don't pass on set cookies to new origins
Daniel Stenberg [Thu, 28 May 2026 08:14:08 +0000 (10:14 +0200)] 
http: don't pass on set cookies to new origins

Verified by test 2015

Reported-by: azraelxuemo on hackerone
Closes #21794

3 weeks agoh3: fix signedness of two printf masks
Viktor Szakats [Thu, 28 May 2026 15:19:23 +0000 (17:19 +0200)] 
h3: fix signedness of two printf masks

Follow-up to c2ca16f3ff2ad8300e67ea5a3cc4060738473e45 #21799

3 weeks agoh3: sync printf masks with types, drop two casts
Viktor Szakats [Thu, 28 May 2026 14:18:21 +0000 (16:18 +0200)] 
h3: sync printf masks with types, drop two casts

Also fix `nwritten` signedness in `cb_h3_read_req_body()`.

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153
Ref: #20848

Closes #21799

3 weeks agoh3-proxy: fixes around H3 proxy
Stefan Eissing [Wed, 27 May 2026 14:50:18 +0000 (16:50 +0200)] 
h3-proxy: fixes around H3 proxy

code:
- less exception handling in existing code
- true ip happy eyeballing
- enable certificate verification
- cf-h2-proxy: abort connection when server closed connection

tests:
- remove all --insecure and --proxy-insecure args
- make session reuse test_60_12 a working one
- resolve port conflicts between h2o and nghttpx
- use proxy args better
- make test_60_06 run shorter
- kill h2o at the end of tests, normal stop takes too long

Ref: 59213f8248cfc10e97a6a23f5e4da9b1e5057400 #21789
Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21798

3 weeks agoGHA: enable H3 proxy in CI, also enable h2o tests on Linux
Viktor Szakats [Wed, 27 May 2026 21:56:50 +0000 (23:56 +0200)] 
GHA: enable H3 proxy in CI, also enable h2o tests on Linux

Also:
- GHA/http3-linux: enable deprecated APIs in openssl-prev local
  OpenSSL builds. Required by h2o and its vendored dependencies.
  Tried OpenSSL 4, LibreSSL 4.x, BoringSSL: all failed at one point.
- GHA/http3-linux: build h2o from source.
  libuv1-dev may not be stricly required.
  Tried installing libwslay-dev, but it wasn't recognized.
  Also disable building h2o libs for a much smaller dist directory and
  slightly faster build.
  Sadly, h2o is not versioned, so I pinned to the current latest commit
  at the master branch. It advertises itself as 2.3.0-DEV in pytest.
- drop redundant `libnghttp3` installs. Remains of openssl-quic builds.
  Follow-up to 6aaac9dd388a64d0f511544496608693e1105d13 #20226

Note GHA/macos pytests may or not not be stable with the H3 proxy tests.

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21789

3 weeks agoh3-proxy: rename feature 'Proxy/PROXY-HTTP3' to 'proxy-HTTP3'
Viktor Szakats [Wed, 27 May 2026 21:50:45 +0000 (23:50 +0200)] 
h3-proxy: rename feature 'Proxy/PROXY-HTTP3' to 'proxy-HTTP3'

For consistency and to follow existing 'HTTPS-proxy' (with lowercase
'proxy') feature tag more closely.

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21796

3 weeks agobuild: say 'experimental' in option descriptions
Viktor Szakats [Wed, 27 May 2026 21:43:27 +0000 (23:43 +0200)] 
build: say 'experimental' in option descriptions

Also:
- INSTALL-CMAKE.md: alpha-sort enable options.
- cmake: sync a description between source and docs.

Closes #21795

3 weeks agotests/http: fix HTTP/3 proxy pytest failures with h2o
Aritra Basu [Thu, 28 May 2026 00:35:44 +0000 (20:35 -0400)] 
tests/http: fix HTTP/3 proxy pytest failures with h2o

Fix pytest failures in HTTP/3 proxy tests when h2o is not installed,
misconfigured, or fails to start at runtime.

This prevents:
- FileNotFoundError when h2o document root does not exist
- Fixture setup errors when h2o is configured but cannot start
- Unused test data file creation when h2o is absent or broken
- CI aborts on systems where h2o exists but is not runnable

Bug: https://github.com/curl/curl/pull/21789#issuecomment-4559098879
Bug: https://github.com/curl/curl/pull/21789#issuecomment-4559161907

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21791

3 weeks agotidy-up: add space around operators, where missing
Viktor Szakats [Thu, 28 May 2026 07:23:27 +0000 (09:23 +0200)] 
tidy-up: add space around operators, where missing

Closes #21793

3 weeks agoGHA: update dependency google/boringssl to v0.20260526.0
renovate[bot] [Thu, 28 May 2026 05:06:20 +0000 (05:06 +0000)] 
GHA: update dependency google/boringssl to v0.20260526.0

Closes #21790

3 weeks agourlapi: fix an issue parsing file URLs
tiymat [Wed, 27 May 2026 03:14:31 +0000 (00:44 -0230)] 
urlapi: fix an issue parsing file URLs

Fixes #21743
Closes #21764

3 weeks agocf-socket: set scope_id for IPv6 link-local addresses
ambikeesshh [Fri, 22 May 2026 18:57:18 +0000 (00:27 +0530)] 
cf-socket: set scope_id for IPv6 link-local addresses

When connecting to an mDNS hostname that resolves to an IPv6 link-local
address, connect() fails with EINVAL because sin6_scope_id is 0. This is
a regression since 8.20.0 where the threaded resolver started splitting
A and AAAA queries into separate getaddrinfo calls. The AAAA-only call
with PF_INET6 may not set scope_id on systems where the same call with
PF_UNSPEC did.

When the resolver does not provide scope_id for a link-local address,
try to determine it from the system's network interfaces using
getifaddrs(). Also add scope_id to verbose connect output so the value
can be seen in curl -v logs.

Built and tested locally on Linux. checksrc passes.

Fixes #21669
Reported-by: Bartel Sielski
Closes #21728

3 weeks agotftp: avoid the timeout calc if the timeout is crazy
Daniel Stenberg [Wed, 27 May 2026 21:37:12 +0000 (23:37 +0200)] 
tftp: avoid the timeout calc if the timeout is crazy

Avoids integer overflow when a silly value is set.

Fixes #21782
Reported-by: Mike-menny on github
Closes #21787

3 weeks agounit3400: repair after capsule_encap_udp_hdr went static
Daniel Stenberg [Wed, 27 May 2026 21:55:14 +0000 (23:55 +0200)] 
unit3400: repair after capsule_encap_udp_hdr went static

Access the static function with UNITTEST as designed.

Follow-up to 73c2b4b4355aab3156

Closes #21788

3 weeks agotidy-up: apply clang-format fixes
Viktor Szakats [Wed, 27 May 2026 16:00:46 +0000 (18:00 +0200)] 
tidy-up: apply clang-format fixes

To lib, vtls/vauth, vtls/vquic, lib/vtls.

Also:
- unit3400: drop redundant `(void)arg`.
  Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153
- fix comment typos.

Closes #21786

3 weeks agopytest: re-enable test test_05_01 and test_05_02 for quiche 0.29.0+
Viktor Szakats [Wed, 27 May 2026 20:40:50 +0000 (22:40 +0200)] 
pytest: re-enable test test_05_01 and test_05_02 for quiche 0.29.0+

The upstream issue seems to have been fixed or mitigated in quiche
v0.29.0. Though the original upstream report and patch remain open at
the time of writing this.

Ref: https://github.com/cloudflare/quiche/issues/2277
Ref: https://github.com/cloudflare/quiche/pull/2278

Follow-up to 252b82f693574e884fb36dfde9371b409716a0fc #21730
Follow-up to 91b422d356a52d32708c02514d8ede66363e8847 #20952
Follow-up to 14478429e71ef0eee6d12b73113e9ff8e3ae9e75 #19916

Closes #21784

3 weeks agom4: drop redundant conditions in TLS library detections
Viktor Szakats [Wed, 27 May 2026 16:39:10 +0000 (18:39 +0200)] 
m4: drop redundant conditions in TLS library detections

Omit checking `OPT_<BACKEND>` against `no` twice.

Also:
- openssl: drop stray `OPT_OPENSSL=off` check.
  Follow-up to 68d89f242cf9f6326e3b2f6fe119b7c74ef41c66 #6897
- rustls: drop no-op line.
  Follow-up to 9c4209837094781d5eef69ae6bcad0e86b64bf99 #13202
- gnutls: fix casing in comment.
- merge `if` branches where possible after these changes.

Closes #21781

3 weeks agolib1560: fix to propagate failure from `get_nothing()`
Viktor Szakats [Wed, 27 May 2026 16:06:51 +0000 (18:06 +0200)] 
lib1560: fix to propagate failure from `get_nothing()`

Also:
- check `curl_url()` for NULL where missing.
- free memory `curl_url_get()` return pointer where missing.
- propagate `curl_url_set()` errors in `clear_url()`, where missing.
- add missing NULL-check before `strcmp()` in `clear_url()`.

Closes #21780

3 weeks agocapsule: make capsule_encap_udp_hdr static
Daniel Stenberg [Wed, 27 May 2026 13:50:19 +0000 (15:50 +0200)] 
capsule: make capsule_encap_udp_hdr static

And drop the Curl_ prefix.

Closes #21777

3 weeks agocreds: remove two unused functions
Daniel Stenberg [Wed, 27 May 2026 13:45:50 +0000 (15:45 +0200)] 
creds: remove two unused functions

Curl_creds_same_user and Curl_creds_same_password

Closes #21776

3 weeks agohttp_proxy: make two proxy_create functions static
Daniel Stenberg [Wed, 27 May 2026 13:42:27 +0000 (15:42 +0200)] 
http_proxy: make two proxy_create functions static

And drop their `Curl_` prefixes. They are only used within this file.

Closes #21775

3 weeks agodnscache: remove Curl_dns_entry_link
Daniel Stenberg [Wed, 27 May 2026 13:40:12 +0000 (15:40 +0200)] 
dnscache: remove Curl_dns_entry_link

Unused function

Closes #21774

3 weeks agocf-h3-proxy.c: bring back include
Daniel Stenberg [Wed, 27 May 2026 20:56:01 +0000 (22:56 +0200)] 
cf-h3-proxy.c: bring back include

Without it, it breaks regular (non-unity) builds.

Fix regression from 7e1001bcd69967707c

Closes #21785

3 weeks agoGHA: update dependency cloudflare/quiche to v0.29.1
renovate[bot] [Wed, 27 May 2026 19:51:17 +0000 (19:51 +0000)] 
GHA: update dependency cloudflare/quiche to v0.29.1

Closes #21783

3 weeks agoautotools: mbedtls detection fixes
Viktor Szakats [Fri, 22 May 2026 23:05:10 +0000 (01:05 +0200)] 
autotools: mbedtls detection fixes

- fix symbol used for first-round detection.
- skip detecting mbedtls on custom path if custom path was not supplied.

Reported-by: Ross Burton
Fixes #21727

Closes #21729

3 weeks agovtls: more large buffer support and error checks for SHA-256
Viktor Szakats [Wed, 27 May 2026 08:06:34 +0000 (10:06 +0200)] 
vtls: more large buffer support and error checks for SHA-256

- gnutls: support 4GiB+ SHA-256 digest inputs.
- openssl: check success of low-level update/finish digest calls.
- openssl: pass NULL to `EVP_DigestFinal_ex()` instead of discarding
  returned value.
- wolfssl: support 4GiB+ SHA-256 digest inputs.
- wolfssl: check success of low-level update/finish digest calls.
- sync and tidy up argument names in low-level sha256_sum functions.

Closes #21771

3 weeks agoschannel: check `schannel_sha256sum()` success, and more
Viktor Szakats [Sun, 24 May 2026 12:55:05 +0000 (14:55 +0200)] 
schannel: check `schannel_sha256sum()` success, and more

Also:
- support 4GiB+ SHA-256 digest inputs.
- check `CryptGetHashParam()` output size.
- avoid overwriting existing digest when new digest calculation fails.
- avoid adding digest hash element on failure.

Closes #21739

3 weeks agocurl_sha512_256: fix result code on error
Viktor Szakats [Wed, 27 May 2026 08:21:24 +0000 (10:21 +0200)] 
curl_sha512_256: fix result code on error

Replace result code `CURLE_SSL_CIPHER` with
`CURLE_BAD_FUNCTION_ARGUMENT` in case of a low-level digest function
fails. Functionality is related to vauth, not SSL, and the operation is
a digest, not a cipher.

Also fix a indentation.

Follow-up to 05268cf801a193b68411cfa298413c3e5ca79d4f #13070

Closes #21767

3 weeks agovtls_spack: drop redundant macro fallbacks
Viktor Szakats [Wed, 27 May 2026 08:24:40 +0000 (10:24 +0200)] 
vtls_spack: drop redundant macro fallbacks

For `UINT16_MAX` and `UINT32_MAX`. They are used in other sources
without this fallback.

Closes #21768

3 weeks agoINSTALL-CMAKE.md: document `H2O` config variable
Viktor Szakats [Wed, 27 May 2026 08:30:18 +0000 (10:30 +0200)] 
INSTALL-CMAKE.md: document `H2O` config variable

Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153

Closes #21769

3 weeks agotidy-up: miscellaneous
Viktor Szakats [Wed, 20 May 2026 10:20:10 +0000 (12:20 +0200)] 
tidy-up: miscellaneous

- H3 proxy: re-sync code with original source `curl_ngtcp2.c` to reduce
  differences, and to apply missed minor fixes. Also apply clang-format.
  Drop redundant `#undef`s, casts, `#endif` comments, includes, drop
  intermediate variables, sync include and macro order.
  Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153
- INSTALL-CMAKE.md: move `CURL_ENABLE_SMB` to the enable section.
- tests/http/env: rename `tcpdmp` to `tcpdump` to match object variable.
- mbedtls: drop incorrect `mbedTLS 4+` comments.
  (features are also supported by 3+, meaning it's always supported.)
- lib1648: rename a variable to match purpose.
- CIPHERS.md: alpha-sort link list.
- replace rare `X''` hex markup with `0x`.
- `IP v4/6` -> `IPv4/6`.
- 'version X.Y' -> 'vX.Y', where sensible.
- 'VX.Y' -> 'vX.Y', where sensible.
- fix indents, casing, newlines, typos.

Closes #21772

3 weeks agocf-h3-proxy: add SSL flag
Stefan Eissing [Wed, 27 May 2026 08:36:22 +0000 (10:36 +0200)] 
cf-h3-proxy: add SSL flag

Since the proxy filter does TLS, it needs to set the SSL flag.

Follow-up to e78b1b3eccfa6a2e3
Closes #21770

Spotted by Codex Security

3 weeks agocontent_encoding: timeout during slow decoding
Stefan Eissing [Tue, 26 May 2026 13:59:09 +0000 (15:59 +0200)] 
content_encoding: timeout during slow decoding

Check during transfer/content decoding for every MB or so, if the
transfer has reached its overall time limit. Error out if so.

This is mainly a protectin against compression bombs using way more time
than the transfer is allowed to. Normal compression ratios are unlikely
to benefit as they need more upstream data where the timeout handling is
already in place.

Fixes #21603
Reported-by: Joshua Rogers
Closes #21758

3 weeks agocontent_encoding: fix limit failure message
Stefan Eissing [Tue, 26 May 2026 13:27:22 +0000 (15:27 +0200)] 
content_encoding: fix limit failure message

The message triggered earlier than intended and did not take the
transfer/content type into account.

Ref #21603
Reported-by: Joshua Rogers
Closes #21756

3 weeks agourlapi: forbid '|' in host
tiymat [Wed, 27 May 2026 01:05:27 +0000 (22:35 -0230)] 
urlapi: forbid '|' in host

Closes #21762

3 weeks agogtls: use the correct return code in trace output
Daniel Stenberg [Wed, 27 May 2026 07:26:41 +0000 (09:26 +0200)] 
gtls: use the correct return code in trace output

Instead of using a hard-coded zero.

Spotted by Copilot

Closes #21766

3 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 27 May 2026 07:06:55 +0000 (09:06 +0200)] 
RELEASE-NOTES: synced

3 weeks agogtls: fix ignored return and uninitialized status in OCSP check
Joshua Rogers [Tue, 19 May 2026 14:16:12 +0000 (16:16 +0200)] 
gtls: fix ignored return and uninitialized status in OCSP check

gnutls_ocsp_resp_get_single() was called with (void) discarding its
return value, so a failure (e.g. an OCSP response with no
SingleResponse entries) went undetected.  The following switch() then
read an uninitialized gnutls_ocsp_cert_status_t, which is undefined
behaviour and could yield GNUTLS_OCSP_CERT_GOOD (0) depending on
stack contents, causing gtls_verify_ocsp_status to return CURLE_OK for
a response that was never successfully parsed.

Fix by initializing status to GNUTLS_OCSP_CERT_UNKNOWN and treating a
negative return from gnutls_ocsp_resp_get_single as an error.

Closes #21679

3 weeks agoHTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC)
Aritra Basu [Mon, 27 Apr 2026 23:35:38 +0000 (19:35 -0400)] 
HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC)

This patch adds two major proxy capabilities to curl (ngtcp2 QUIC):
- HTTP/3 Proxy CONNECT: Tunnel HTTP/1.1 or HTTP/2 traffic through an
  HTTPS proxy that speaks HTTP/3 (QUIC) using the standard CONNECT
  method over an HTTP/3 connection.
- MASQUE CONNECT-UDP: Tunnel HTTP/3 (QUIC) traffic through an HTTP
  proxy (speaking HTTP/1.1, HTTP/2, or HTTP/3) using the extended
  CONNECT method with the CONNECT-UDP protocol (RFC9297 & RFC9298).

Public API additions:
- `CURLPROXY_HTTPS3`: new proxy type constant for HTTP/3 proxy
- `--proxy-http3`: new CLI flag to negotiate HTTP/3 with HTTPS proxy

The implementation adds two new filters:
- `H3-PROXY` - enables negotiating HTTP/3 (QUIC) to the proxy and
  running CONNECT/CONNECT-UDP through that proxy transport.
- `CAPSULE` - dedicated filter inserted between QUIC transport and
  HTTP-PROXY to handle datagram capsule encapsulation/decapsulation.

Here is how the curl filter chaining looks in different scenarios:
- HTTP/3 Proxy CONNECT (tunneling TCP protocols over QUIC proxy):
  conn -> HTTP/1.1 or HTTP/2  -> SSL -> HTTP-PROXY ->
                                 H3-PROXY -> HAPPY-EYEBALLS -> UDP
- MASQUE CONNECT-UDP (tunneling QUIC over any proxy):
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H3-PROXY ->
                               HAPPY-EYEBALLS -> UDP
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H1-PROXY or H2-PROXY ->
                               SSL -> HAPPY-EYEBALLS -> TCP

- Both features currently require the ngtcp2 QUIC backend.
- Both features are experimental (disabled by default). Enable with
  `--enable-proxy-http3`(autotools) or `-DUSE_PROXY_HTTP3=ON`(CMake).

Tests:
- tests/unit/unit3400.c: Unit tests for capsule protocol encode/decode
- tests/http/test_60_h3_proxy.py: Comprehensive pytest integration suite
- tests/http/testenv/h2o.py: Managing h2o instances with HTTP/1.1, HTTP/2,
  and HTTP/3 (QUIC) listeners, proxy.connect and proxy.connect-udp enabled.

References:
  RFC 9297 - HTTP Datagrams and the Capsule Protocol
  RFC 9298 - Proxying UDP in HTTP
  RFC 9000 §16 — Variable-Length Integer Encoding

Signed-off-by: Aritra Basu <aritrbas+gh@cisco.com>
Closes #21153

3 weeks agoGHA: fix locale tests on macOS, extend to verify test 1981
Viktor Szakats [Tue, 26 May 2026 09:40:15 +0000 (11:40 +0200)] 
GHA: fix locale tests on macOS, extend to verify test 1981

- fix macOS locale tests to clear existing variables.
  (Without this, the system-defined `LC_ALL` takes precedence, and
  the custom envs in CI are ignored.)

- trigger test 1981 issue by setting `LC_TIME` to non-English, on macOS.
  (On Linux it'd require explicitly installing a non-English locale, I
  skipped this for simplicity.)
  ```
  [...]
  -Time: 01/Aug/2025 08:31:43.037103 +0000 UTC[CR][LF]
  +Time: 01/ao%c3%bb/2025 08:31:43.037103 +0000 UTC[CR][LF]
  [...]
  FAIL 1981: '%time output with --write-out' HTTP, HTTP GET
  ```
  Follow-up to 90a7732d467eae7c5a59fc07c5a072970926f8c6 #21749

Follow-up to 1cc8a5235f76e744433cbf28ec98ecb972158387 #17988
Follow-up to c221c0ee5935497168c52686a9d8cc87b45bbca9 #17938

Closes #21753

3 weeks agoINSTALL-CMAKE.md: drop two obsolete sections
Viktor Szakats [Tue, 26 May 2026 19:32:19 +0000 (21:32 +0200)] 
INSTALL-CMAKE.md: drop two obsolete sections

Follow-up to 89043ba90689418a115e967633e261139b48ce23 #20407

Closes #21761

3 weeks agoGHA: verify tarball downloads
Viktor Szakats [Tue, 26 May 2026 13:56:27 +0000 (15:56 +0200)] 
GHA: verify tarball downloads

Detect latest tarball version via the https://curl.se/downloads.html
page, download the signing key from a public keyserver then verify
source download signatures.

To ensure that public downloads are intact.

Closes #21759