]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
8 weeks agoruntests: allow skipping tests on torture, use for test 357
Viktor Szakats [Mon, 8 Jun 2026 10:37:48 +0000 (12:37 +0200)] 
runtests: allow skipping tests on torture, use for test 357

Some tests may take a long time in torture mode. Make it possible
to skip individual tests when runtests in running in torture mode.

Also:
- skip test 357 for the reason above.
  Saved 1-3 minutes for the Linux CI torture job, 1-1.5m on Windows.
  No savings on macOS.

Reported-by: Stefan Eissing
Fixes #21873

Closes #21906

8 weeks agolibssh2: save non-standard port to `known_hosts`
Viktor Szakats [Fri, 5 Jun 2026 13:56:17 +0000 (15:56 +0200)] 
libssh2: save non-standard port to `known_hosts`

Reported-by: dyingc on github
Fixes #21863

Closes #21874

8 weeks agosetopt: claer the "custom" CA booleans when set to NULL
Daniel Stenberg [Mon, 8 Jun 2026 07:29:24 +0000 (09:29 +0200)] 
setopt: claer the "custom" CA booleans when set to NULL

Mark them as custom choices only when pointer is passed, and clear them
again when set to NULL.

Closes #21901

8 weeks agovar: use a dedicated pointer for the alloc
Daniel Stenberg [Mon, 8 Jun 2026 06:11:34 +0000 (08:11 +0200)] 
var: use a dedicated pointer for the alloc

As the 'c' pointer might actually get modified before it is time to free
the memory.

Verify in test 2310

Reported-by: Eunsoo Kim
Fixes #21898
Closes #21900

8 weeks agoRevert "url: remove ssh_config_matches"
Daniel Stenberg [Mon, 8 Jun 2026 05:54:50 +0000 (07:54 +0200)] 
Revert "url: remove ssh_config_matches"

This reverts commit 3e9817cd1bb6aa53d3d3bf10572bb245d064870c.

The change was incorrect as the check was not for the options the commit
message mentions.

Reported-by: ByteRay on hackerone
Closes #21899

8 weeks agourlapi: fix memleaks on error in `parse_hostname_login()`
Viktor Szakats [Fri, 5 Jun 2026 14:39:20 +0000 (16:39 +0200)] 
urlapi: fix memleaks on error in `parse_hostname_login()`

Detected by GitHub Code Quality

Follow-up to acd82c8bfd743d0f743a1c1296890738832ac83e #11006
Follow-up to 4183b8fe9a8558b8f62c9dbf8271deed75bff28b #8049

Closes #21879

8 weeks agolib1587: drop redundant includes
Viktor Szakats [Sun, 7 Jun 2026 22:28:41 +0000 (00:28 +0200)] 
lib1587: drop redundant includes

Closes #21892

8 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 7 Jun 2026 21:19:55 +0000 (23:19 +0200)] 
RELEASE-NOTES: synced

8 weeks agoCURLOPT_DISALLOW_USERNAME_IN_URL: is for CURLOPT_URL only
Daniel Stenberg [Sun, 7 Jun 2026 12:48:50 +0000 (14:48 +0200)] 
CURLOPT_DISALLOW_USERNAME_IN_URL: is for CURLOPT_URL only

Closes #21890

8 weeks agotool: warn when --ssl and --ftp-ssl-control override each other
Daniel Stenberg [Sat, 6 Jun 2026 22:22:53 +0000 (00:22 +0200)] 
tool: warn when --ssl and --ftp-ssl-control override each other

and mention this properly in the docs.

Closes #21887

8 weeks agoCURLOPT_PORT.md: use stronger language
Daniel Stenberg [Sat, 6 Jun 2026 22:09:30 +0000 (00:09 +0200)] 
CURLOPT_PORT.md: use stronger language

This option should not be used.

Closes #21886

8 weeks agoprogress: fx CURLINFO time reporting
Stefan Eissing [Tue, 2 Jun 2026 09:10:10 +0000 (11:10 +0200)] 
progress: fx CURLINFO time reporting

Whack the times reported for a transfer (see
https://curl.se/libcurl/c/curl_easy_getinfo.html#TIMES) into order for
all variations of up-/download, http/ftp etc. Make sure they are
reported in the documented order.

There is still the *possibility* of PRETRANSFER being longer then
POSTTRANSFER, if a server sends a response before an upload is done.
POST is the time the first response byte is received, and PRE is the
time the last byte was sent by curl.

This may happen with more likelihood on HTTP/2 and 3 for a server
rejected upload. But for successful uploads, the answer will almost over
come afterwards.

Undo the previous twists in lib500.c tests, adjust pytest timeline
checks.

Fixes #21828
Reported-by: BazaarAcc32 on github
Closes #21843

2 months agoftplistparser: clear strings.target if not symlink
Daniel Stenberg [Sat, 6 Jun 2026 21:38:22 +0000 (23:38 +0200)] 
ftplistparser: clear strings.target if not symlink

When the struct is passed to the CURLOPT_CHUNK_BGN_FUNCTION callback,
clear the pointer if the provided data is not a symlink.

Closes #21884

2 months agoCURLOPT_PINNEDPUBLICKEY.md: does not apply for other origins
Daniel Stenberg [Sat, 6 Jun 2026 21:50:47 +0000 (23:50 +0200)] 
CURLOPT_PINNEDPUBLICKEY.md: does not apply for other origins

Clarify

Closes #21885

2 months agoCURLOPT_CHUNK_BGN_FUNCTION: target is there for symlinks only
Daniel Stenberg [Sat, 6 Jun 2026 21:34:15 +0000 (23:34 +0200)] 
CURLOPT_CHUNK_BGN_FUNCTION: target is there for symlinks only

Closes #21883

2 months agohttp: reject spurious CR bytes in headers
Daniel Stenberg [Sat, 6 Jun 2026 15:27:52 +0000 (17:27 +0200)] 
http: reject spurious CR bytes in headers

Verified by test 2105

Closes #21882

2 months agoschannel_verify: simplify CryptQueryObject use
Vasiliy-Kkk [Tue, 26 May 2026 13:55:39 +0000 (16:55 +0300)] 
schannel_verify: simplify CryptQueryObject use

- Specify that the content is base64 encoded, rather than rely on
  auto-detect.

- Remove unnecessary sanity check of the returned content type.

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

2 months agotidy-up: miscellaneous
Viktor Szakats [Mon, 1 Jun 2026 22:44:17 +0000 (00:44 +0200)] 
tidy-up: miscellaneous

- fix typos.
- badword: add two new words.
- cpp: drop parentheses from standalone `#if` expressions.
- libssh: vertical-align comment block with others.
- clang-format.

Closes #21880

2 months agovquic: drop stray casts for `iovec.iov_len`
Viktor Szakats [Fri, 5 Jun 2026 14:31:09 +0000 (16:31 +0200)] 
vquic: drop stray casts for `iovec.iov_len`

Spotted by GitHub Code Quality

Closes #21877

2 months agolibssh2: replace macro names with non-misspelled alternatives
Viktor Szakats [Fri, 5 Jun 2026 14:22:43 +0000 (16:22 +0200)] 
libssh2: replace macro names with non-misspelled alternatives

They are available in libssh2 0.15+.

Closes #21876

2 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 2 Jun 2026 15:01:32 +0000 (17:01 +0200)] 
RELEASE-NOTES: synced

2 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 1 Jun 2026 06:50:11 +0000 (08:50 +0200)] 
RELEASE-NOTES: synced

2 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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