]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 weeks agosftp: fix range downloads in both SSH backends
Daniel Stenberg [Tue, 11 Nov 2025 08:42:16 +0000 (09:42 +0100)] 
sftp: fix range downloads in both SSH backends

When asking for the last N bytes of a file, and that size was larger
than the file size, it would miss the first byte due to a logic error.

The fixed range parser is now made a common function in the file now
renamed to vssh.c (from curl_path.c) - used by both backends.

Unit test 2605 verifies the parser.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19460

5 weeks agoGHA/linux: build and enable nghttp2 for Fil-C job
Viktor Szakats [Mon, 10 Nov 2025 21:30:24 +0000 (22:30 +0100)] 
GHA/linux: build and enable nghttp2 for Fil-C job

pytests after: 527 passed, 286 skipped
pytests before: 392 passed, 423 skipped

runtests after: TESTDONE: 1646 tests out of 1646 reported OK: 100%
runtests before: TESTDONE: 1643 tests out of 1643 reported OK: 100%

Ref: b81d30ade314af7c3197dfcef2d978428b96b009 #19458

Closes #19457

5 weeks agopytest: fix conditions for test_02_28
Viktor Szakats [Mon, 10 Nov 2025 21:43:59 +0000 (22:43 +0100)] 
pytest: fix conditions for test_02_28

- allow 02_28 to run in HTTP/1.1 without H2 support again.
  Follow-up to 3752de465d70552106b2527fbf821aee525e53e2 #19412

- fix to skip 02_28 for all protocols for curl without compression
  support (either zlib, brotli or ztsd).

Closes #19458

5 weeks agoGHA/linux: disable test 776 in valgrind jobs to avoid delay
Viktor Szakats [Mon, 10 Nov 2025 20:26:25 +0000 (21:26 +0100)] 
GHA/linux: disable test 776 in valgrind jobs to avoid delay

Saving ~30 seconds in jobs affected.

Closes #19456

5 weeks agoOS400/makefile.sh: fix shellcheck warning SC2038
Viktor Szakats [Mon, 10 Nov 2025 15:54:57 +0000 (16:54 +0100)] 
OS400/makefile.sh: fix shellcheck warning SC2038

Also:
- OS400/makefile.sh: use end-of-options marker in xargs command.
- OS400/make-tests.sh: drop warning suppression.
  Seems to not trigger anymore as of shellcheck 0.11.0

Closes #19451

5 weeks agoscripts: use end-of-options marker in `find -exec` commands
Viktor Szakats [Mon, 10 Nov 2025 15:49:11 +0000 (16:49 +0100)] 
scripts: use end-of-options marker in `find -exec` commands

Closes #19450

5 weeks agoverify-release: update to avoid shellcheck warning SC2034
Viktor Szakats [Mon, 10 Nov 2025 14:08:19 +0000 (15:08 +0100)] 
verify-release: update to avoid shellcheck warning SC2034

```
SC2034: dl appears unused
```

Also to shorten the code.

Closes #19449

5 weeks agomdlinkcheck: pass curl arguments to `open()` as list
Viktor Szakats [Mon, 10 Nov 2025 00:27:25 +0000 (01:27 +0100)] 
mdlinkcheck: pass curl arguments to `open()` as list

To prevent misinterpreting quotes or other special characters.

Requires Perl 5.22+ (2015-Jun-01) on Windows.

Ref: https://perldoc.perl.org/functions/open

Closes #19437

5 weeks agoscripts: fix shellcheck SC2046 warnings
Viktor Szakats [Sun, 9 Nov 2025 23:32:02 +0000 (00:32 +0100)] 
scripts: fix shellcheck SC2046 warnings

Fix SC2046: "Quote this to prevent word splitting."
Ref: https://www.shellcheck.net/wiki/SC2046

Also:
- shellcheck.sh: add `set -eu`.
- shellcheck.sh, yamlcheck.sh: always run from repo root.
- pass `--` before passing the list of files, where missing.
- badwords.pl, cleancmd.pl: rework to accept `git ls-files` arguments.
  Requires Perl 5.22+ (2015-Jun-01) on Windows.
  Ref: https://perldoc.perl.org/functions/open
- INTERNALS.md: require Perl 5.22 on Windows.
- spacecheck.pl: formatting.
- GHA/http3-linux: rework command to avoid SC2046.
- stop suppressing SC2046 warnings.

The yamlcheck.sh issue reported-by: Stanislav Fort (Aisle Research)
Ref: 20251109163515_6eb31da3-deb2-4f4d-8327-935904f27da5

Closes #19432

5 weeks agotests/data: support using native newlines on disk, drop `.gitattributes`
Viktor Szakats [Fri, 7 Nov 2025 15:39:29 +0000 (16:39 +0100)] 
tests/data: support using native newlines on disk, drop `.gitattributes`

Data files no longer depend on mixed newline styles. Before this
patch the harness still assumed data files to use LF newlines,
ensured by `.gitattribute` and distributing sources with LF newlines.

To allow using platform native newlines (CRLF on Windows typically),
update the test harness to support data files with any newline style
on disk. And delete `.gitattributes`.

Fix to:
- load original data files (from test/data) so that their newline-style
  doesn't matter on the checked out source repo, meaning it works
  when its CRLF on Windows, just like any other file.
  (if a BOM slips in, it's caught by `spacecheck.pl` as binary content.)
- do the same in `util.py` used by `smbserver.py` (for test 1451).
- also fix `util.py` to use us-ascii encoding for data files, replacing utf-8.

Also:
- runtests: rework the stray CR checker to allow full CRLF data files,
  and keep warning for mixed newlines.

Follow-up to 904e7ecb66519951681377758fe6b07dde28ce36 #19347

Closes #19398

5 weeks agoexamples/crawler: fix variable
Daniel Stenberg [Mon, 10 Nov 2025 12:17:37 +0000 (13:17 +0100)] 
examples/crawler: fix variable

A variable missed in the previous rename cleanup

Follow-up to 928363f28ca533d743adcb70597c3e30917
Reported-by: Gisle Vanem
Closes #19446

5 weeks agosocks_sspi: use free() not FreeContextBuffer()
Daniel Stenberg [Mon, 10 Nov 2025 10:08:26 +0000 (11:08 +0100)] 
socks_sspi: use free() not FreeContextBuffer()

The memory is allocated with malloc().

This reverts commit 1d01d4975f540f3a363b38e1296aead62130fc6d.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19445

5 weeks agoOS400/ccsidcurl: fix curl_easy_setopt_ccsid for non-converted blobs
Daniel Stenberg [Mon, 10 Nov 2025 09:26:19 +0000 (10:26 +0100)] 
OS400/ccsidcurl: fix curl_easy_setopt_ccsid for non-converted blobs

When a blob option is used and it does not convert, the code would
erroneously pass along an uninitialized stack struct.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19444

5 weeks agoRELEASE-NOTES: spellcheck
Daniel Stenberg [Mon, 10 Nov 2025 09:41:38 +0000 (10:41 +0100)] 
RELEASE-NOTES: spellcheck

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 10 Nov 2025 09:09:03 +0000 (10:09 +0100)] 
RELEASE-NOTES: synced

5 weeks agorenovate.json: drop parentheses from group names
Daniel Stenberg [Mon, 10 Nov 2025 08:23:56 +0000 (09:23 +0100)] 
renovate.json: drop parentheses from group names

They make git branch names using those parentheses, that need to be
quoted when used with git command lines. Avoid parentheses for easier to
use branch names.

Follow-up to f77c574445532e3c17e62

Closes #19441

5 weeks agoGHA: update awslabs/aws-lc to v1.63.0
renovate[bot] [Mon, 10 Nov 2025 01:01:14 +0000 (01:01 +0000)] 
GHA: update awslabs/aws-lc to v1.63.0

Closes #19435

5 weeks agodigest_sspi: properly free sspi identity
x2018 [Sun, 9 Nov 2025 17:44:27 +0000 (01:44 +0800)] 
digest_sspi: properly free sspi identity

Closes #19426

5 weeks agourlapi: fix mem-leaks in curl_url_get error paths
Daniel Stenberg [Mon, 10 Nov 2025 07:47:51 +0000 (08:47 +0100)] 
urlapi: fix mem-leaks in curl_url_get error paths

Reported-by: Stanislav Fort (Aisle Research)
Closes #19440

5 weeks agoschannel: fix potental memory leak of cert_store_path on four error paths
x2018 [Sun, 9 Nov 2025 14:20:24 +0000 (22:20 +0800)] 
schannel: fix potental memory leak of cert_store_path on four error paths

Closes #19423

5 weeks agomqtt: properly handle the message which exceeds maxsize
x2018 [Sun, 9 Nov 2025 11:19:13 +0000 (19:19 +0800)] 
mqtt: properly handle the message which exceeds maxsize

We should goto fail as topic is allocated.

Follow-up to 92fd791

Closes #19417

5 weeks agocshutdn: acknowledge FD_SETSIZE for shutdown descriptors
Stanislav Fort [Mon, 10 Nov 2025 07:18:53 +0000 (08:18 +0100)] 
cshutdn: acknowledge FD_SETSIZE for shutdown descriptors

In the logic called for curl_multi_fdset().

File descriptors larger than FD_SETSIZE size are simply ignored, which
of course will make things break but at least it does not trash memory.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19439

5 weeks agortmp: fix double-free on URL parse errors
Daniel Stenberg [Mon, 10 Nov 2025 07:11:30 +0000 (08:11 +0100)] 
rtmp: fix double-free on URL parse errors

Reported-by: Stanislav Fort (Aisle Research)
Closes #19438

5 weeks agowcurl: import v2025.11.09
Samuel Henrique [Sun, 9 Nov 2025 14:37:24 +0000 (06:37 -0800)] 
wcurl: import v2025.11.09

Closes #19430

5 weeks agosetopt: disable CURLOPT_HAPROXY_CLIENT_IP on NULL
Daniel Stenberg [Mon, 10 Nov 2025 00:02:37 +0000 (01:02 +0100)] 
setopt: disable CURLOPT_HAPROXY_CLIENT_IP on NULL

As documented.

Reported-by: Stanislav Fort (Aisle Research)
Closes #19434

5 weeks agoprocesshelp.pm: log taskkill pid info, add debug envs, enable in CI
Viktor Szakats [Sun, 9 Nov 2025 12:54:49 +0000 (13:54 +0100)] 
processhelp.pm: log taskkill pid info, add debug envs, enable in CI

To debug the Windows CI fails further. Acting on the suspicions that
`taskkill` may sometimes be applied to the wrong process.

- log task info, and task child info before calling `taskkill` on a PID.
  (on native Windows.)
  One of the calls needs PowerShell.

- add env `CURL_TEST_NO_TASKKILL` to disable using `taskkill`.

- add env `CURL_TEST_NO_TASKKILL_TREE` to use `taskkill` without
  `-t`, meaning to kill the process, but not child processes.

- GHA/windows: disable `taskkill` calls, to see what happens.
  I'll revert or tweak this in a future commit depending on results.

Ref: https://github.com/curl/curl/discussions/14854#discussioncomment-13062859
Ref: https://github.com/curl/curl/discussions/14854#discussioncomment-14913014

Closes #19421

5 weeks agotests/server: do not fall back to original data file in `test2fopen()`
Viktor Szakats [Sun, 9 Nov 2025 18:37:28 +0000 (19:37 +0100)] 
tests/server: do not fall back to original data file in `test2fopen()`

Before this patch servers were loading the original data source file
(from `tests/data/test*`) if they failed to open the preprocessed data
file.

It was causing issues in many (most?) tests, because original data files
are not preprocessed, thus may be incomplete and/or come with wrong
newline characters. It's also causing difficult to diagnose issues when
a test accidentally references another test's data, which by chance
makes the test pass initially, until either that or the executed test
data gets an update, and breaking it, as seen in #19329.

Historically, the fallback existed first, then the preprocessed copy.
The fallback is no longer used by tests (except by stray accidents).

Fix it by dropping the fallback logic and relying on the preprocessed
data file saved there by the runtests framework.

Also fix two remaining test data cross-references:
- test1565: reference own server input data instead of test1's.
- test3014: reference own server input data instead of test1439's.
  Ref: #19398

Follow-up to aaf9522a2c28e5142c7f5640da4e24b65b47dc53 #19329

Closes #19429

5 weeks agotests/data: replace hard-coded test numbers with `%TESTNUMBER`
Viktor Szakats [Sun, 9 Nov 2025 18:02:00 +0000 (19:02 +0100)] 
tests/data: replace hard-coded test numbers with `%TESTNUMBER`

Closes #19427

5 weeks agotests/data: delete stray space indentation from xml tags
Viktor Szakats [Tue, 4 Nov 2025 13:51:31 +0000 (14:51 +0100)] 
tests/data: delete stray space indentation from xml tags

Closes #19428

5 weeks agocmake: adjust defaults for target platforms not supporting shared libs
Viktor Szakats [Sat, 8 Nov 2025 01:27:23 +0000 (02:27 +0100)] 
cmake: adjust defaults for target platforms not supporting shared libs

If CMake reports the target platform not supporting shared libs, turn
`BUILD_SHARED_LIBS` off by default. CMake 3.30+ fails with an error
when trying to create a `SHARED` target for such platforms. Earlier
versions used a workaround that may or may not have worked in practice.

Ref: https://cmake.org/cmake/help/v3.30/policy/CMP0164.html

Seen this with a build setting `-DCMAKE_SYSTEM_NAME=Generic`, e.g.
AmigaOS.

Note this may introduce incompatibility for "Generic" targets, which
support shared libs. If that's the case, set `BUILD_SHARED_LIBS=ON`
manually.

Also drop AmigaOS-specific logic handled automatically after this patch.

Ref: https://cmake.org/cmake/help/v3.7/command/get_property.html
Ref: https://cmake.org/cmake/help/v3.7/prop_gbl/TARGET_SUPPORTS_SHARED_LIBS.html

Closes #19420

5 weeks agotests/data: replace `%CR` with `crlf=headers` where possible
Viktor Szakats [Sun, 9 Nov 2025 14:54:11 +0000 (15:54 +0100)] 
tests/data: replace `%CR` with `crlf=headers` where possible

Missed them in previous rounds of updates:
test 433, 1375, 1376, 1377, 1429

Closes #19424

5 weeks agoINSTALL-CMAKE.md: document static option defaults more
Viktor Szakats [Sun, 9 Nov 2025 11:56:42 +0000 (12:56 +0100)] 
INSTALL-CMAKE.md: document static option defaults more

Closes #19419

5 weeks agoTODO: improve code for large MQTT payloads
Daniel Stenberg [Sun, 9 Nov 2025 10:45:03 +0000 (11:45 +0100)] 
TODO: improve code for large MQTT payloads

Closes #19416

5 weeks agomqtt: reject overly big messages
Daniel Stenberg [Sun, 9 Nov 2025 10:12:06 +0000 (11:12 +0100)] 
mqtt: reject overly big messages

Reported-by: Jiyong Yang
Closes #19415

5 weeks agoftp: refactor a piece of code by merging the repeated part
x2018 [Sat, 8 Nov 2025 17:54:51 +0000 (01:54 +0800)] 
ftp: refactor a piece of code by merging the repeated part

Closes #19411

5 weeks agoasyn-thrdd: release rrname if ares_init_options fails
x2018 [Sat, 8 Nov 2025 16:37:16 +0000 (00:37 +0800)] 
asyn-thrdd: release rrname if ares_init_options fails

Closes #19410

5 weeks agotftp: release filename if conn_get_remote_addr fails
x2018 [Sat, 8 Nov 2025 15:44:58 +0000 (23:44 +0800)] 
tftp: release filename if conn_get_remote_addr fails

Closes #19409

5 weeks agoopenssl: release ssl_session if sess_reuse_cb fails
x2018 [Sat, 8 Nov 2025 12:07:54 +0000 (20:07 +0800)] 
openssl: release ssl_session if sess_reuse_cb fails

Closes #19405

5 weeks agoGHA/linux: stop disabling TLS-SRP tests in event-based & duphandle jobs
Viktor Szakats [Sat, 8 Nov 2025 21:54:08 +0000 (22:54 +0100)] 
GHA/linux: stop disabling TLS-SRP tests in event-based & duphandle jobs

They were disabled since these jobs ran in Zuul. The tests are 320, 321,
322, 323, 324. Of which, 323 runs in CI, the rest needs `gnutls-serv`
with SRP enabled, which is not available in current jobs and no longer
offered by Ubuntu's `gnutls-bin` package. 324 doesn't appear as
a skipped test, 323 seems to be running fine, the rest are logged as
skipped. This suggests it's safe to drop the exceptions.

Closes #19413

5 weeks agoGHA/linux: build and test LibreSSL with Fil-C curl, enable pytests
Viktor Szakats [Sat, 8 Nov 2025 12:54:11 +0000 (13:54 +0100)] 
GHA/linux: build and test LibreSSL with Fil-C curl, enable pytests

Build and cache LibreSSL locally with Fil-C and enable it in the Fil-C
job.

Also:
- disable test 776 in the Fil-C job. It fails consistently, and due to
  flakiness seen earlier its result is disabled. In this job it seems to
  be adding 1 to 9 minues to the test run step and fails consistently.
- include Fil-C version in the LibreSSL cache key to prepare for Fil-C
  ABI changes.
- GHA/linux: fully quote `tflags` values to avoid breaking YAML.

Tested and confirmed working with OpenSSL too, but ended up with
LibreSSL for faster, smaller builds.

Closes #19407

5 weeks agopytest: skip H2 tests if feature missing from curl
Viktor Szakats [Sat, 8 Nov 2025 17:23:32 +0000 (18:23 +0100)] 
pytest: skip H2 tests if feature missing from curl

To allow running pytests on more curl configurations.

Also delete a redundant H3 feature check from test_17_14_expired_cert.

Cherry-picked from #19407
Closes #19412

5 weeks agoCURLOPT_SSH_KEYFUNCTION.md: fix minor indent mistake in example
Daniel Stenberg [Sat, 8 Nov 2025 16:49:30 +0000 (17:49 +0100)] 
CURLOPT_SSH_KEYFUNCTION.md: fix minor indent mistake in example

5 weeks agoCURLOPT_READFUNCTION.md: clarify the size of the buffer
Daniel Stenberg [Sat, 8 Nov 2025 11:43:24 +0000 (12:43 +0100)] 
CURLOPT_READFUNCTION.md: clarify the size of the buffer

No need to multiply with size as size is always 1 - and documented so.

Closes #19402

5 weeks agoCURLINFO_SCHEME/PROTOCOL: they return the "scheme" for a "transfer"
Daniel Stenberg [Sat, 8 Nov 2025 16:09:31 +0000 (17:09 +0100)] 
CURLINFO_SCHEME/PROTOCOL: they return the "scheme" for a "transfer"

Not protocol. Not for connection.

Closes #19403

5 weeks agoCURLINFO_TLS_SSL_PTR.md: remove CURLINFO_TLS_SESSION text
Daniel Stenberg [Sat, 8 Nov 2025 11:58:13 +0000 (12:58 +0100)] 
CURLINFO_TLS_SSL_PTR.md: remove CURLINFO_TLS_SESSION text

That option is properly documented in its own page.

Closes #19404

5 weeks agoCURLINFO: remove 'get' and 'get the' from each short desc
Daniel Stenberg [Sat, 8 Nov 2025 12:09:50 +0000 (13:09 +0100)] 
CURLINFO: remove 'get' and 'get the' from each short desc

The short descriptions describe the data each info retrieves. The info
itself does not 'get' the data.

This simplifies and shortens the descriptions and make them more
consistent.

Closes #19406

5 weeks agovtls: fix CURLOPT_CAPATH use
Stefan Eissing [Sat, 8 Nov 2025 13:28:38 +0000 (14:28 +0100)] 
vtls: fix CURLOPT_CAPATH use

A regression in curl 8.17.0 led to a customer CAPATH set by the
application (or the curl command) to be ignored unless licurl was built
with a default CAPATH.

Add test cases using `--capath` on the custom pytest CA, generated with
the help of the openssl command when available.

Fixes #19401
Reported-by: Brad King
Closes #19308

5 weeks agoGHA/linux: add minimal Fil-C build with tests
Viktor Szakats [Thu, 6 Nov 2025 22:59:16 +0000 (23:59 +0100)] 
GHA/linux: add minimal Fil-C build with tests

Requirements for Fil-C:
- not to accidentally pick up system headers. E.g. from `/usr/include`
  on Linux. It can happen when any dependency is auto-detected on this
  header path. This makes Fil-C find the wrong system headers, which
  in turn breaks the configuration step in subtle ways (with CMake) and
  less subtle ways (autotools). Then CMake ends up running into an error
  while compiling.
- build all dependencies with Fil-C too.
  (this patch doesn't build any dependencies yet.)
- "unity" mode disabled. It should work, but needs a lot of memory and
  slower than a standard compiler, or a Fil-C non-unity build.
- x86_64 Linux host platform when using the pre-built toolchain.

Observations on a minimal, static build made with no dependencies and
Fil-C 0.674 (based on clang 20.1.8).
- curl tool sizes:
  - cmake, default, w/o -O: 30 MB (gcc 14.2.0: 1.7 MB)
  - cmake, default, w/o -O, stripped: 29.6 MB (gcc: 1.4 MB)
  - cmake, Release, -O3: 7.2 MB (gcc: 1 MB)
  - cmake, Release, -O3, stripped: 6.8 MB (gcc: 0.93 MB)
  - autotools, default, -O2: 7 MB
- libcurl.a size is 32 MB (cmake, default, w/o -O) (gcc: 2.7 MB)
- build times 3-3.5x longer (compared to system gcc 14.2.0):
- all runtests available pass OK.
- all pytests skipped due to missing features/dependencies.
- shared libcurl builds also work (cmake, default: 25 MB libcurl.so and
  5.75 MB (5.6 stripped) curl tool)
- autotools works fine too, with dependencies disabled or set to avoid
  `/usr/include`.

Closes #19391

5 weeks agovtls: handle possible malicious certs_num from peer
x2018 [Fri, 7 Nov 2025 12:51:22 +0000 (20:51 +0800)] 
vtls: handle possible malicious certs_num from peer

For GnuTLS, mbedTLS, Rustls, Schannel and wolfSSL

This check was previously added for OpenSSL in 3df71e6dc23e80466c2d448

Closes #19397

5 weeks agortmp: precaution for a potential integer truncation
x2018 [Fri, 7 Nov 2025 16:43:51 +0000 (00:43 +0800)] 
rtmp: precaution for a potential integer truncation

On some platforms, socket descriptors may use types larger than int.
When these values exceed INT_MAX, conversion to int can truncate to
negative values causing RTMP connection failures, and even accidentally
affect other socket when high-value descriptors map to existing
lower-value sockets after integer conversion. This check ensures socket
values are within the safe range before passing them to the RTMP
library.

Closes #19399

5 weeks agolib: fix gssapi.h include on IBMi
Andrew [Mon, 3 Nov 2025 13:53:00 +0000 (13:53 +0000)] 
lib: fix gssapi.h include on IBMi

Fixes #19336
Closes #19337

5 weeks agogtls: skip session resumption when verifystatus is set
Daniel Stenberg [Fri, 7 Nov 2025 12:10:48 +0000 (13:10 +0100)] 
gtls: skip session resumption when verifystatus is set

Resumed TLS sessions skip OCSP stapled-response verification. Force a
full handshake so verifystatus() runs.

Follow-up to 4bfd7a961521e1fd6aab7610e931d82a342781

Pointed out by ZeroPath

5 weeks agodocs: mention umask need when curl creates files
Daniel Stenberg [Fri, 7 Nov 2025 12:42:36 +0000 (13:42 +0100)] 
docs: mention umask need when curl creates files

for cookies, alt-svc and HSTS, command line and library

Closes #19396

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 7 Nov 2025 12:06:28 +0000 (13:06 +0100)] 
RELEASE-NOTES: synced

5 weeks agolib: refactor the type of funcs which have useless return and checks
x2018 [Thu, 6 Nov 2025 17:59:00 +0000 (01:59 +0800)] 
lib: refactor the type of funcs which have useless return and checks

Some internal functions always return CURLE_OK.

- Curl_http_proxy_get_destination() does that from bb4032a, (2 years
  ago) And the original inline code does not need to check the status.

- Curl_wildcard_init() does that from e60fe20. (8 years ago)

- Curl_initinfo() does that from a very beginning.

- Curl_pgrsSetDownloadCounter() did not have a return before 914e49b,
  ad051e1 recovered its content (2 years ago) but did not completely
  recovered the changes related to it.

- auth_digest_get_qop_values() does that from 676de7f.

This directly changes their type to void and cleaned the remaining
checks for their return value.

Closes #19386

5 weeks agoosslq: code readability
Stefan Eissing [Fri, 7 Nov 2025 10:50:02 +0000 (11:50 +0100)] 
osslq: code readability

- remove assertions that are unnecessary
- lookup stream after assertions

Closes #19394

5 weeks agorenovate: update ruff less often
Viktor Szakats [Thu, 6 Nov 2025 23:52:12 +0000 (00:52 +0100)] 
renovate: update ruff less often

`ruff` seems to be getting a new release every week. Make renovate bump
it once every month.

Closes #19392

5 weeks agotool: consider (some) curl_easy_setopt errors fatal
Daniel Stenberg [Thu, 6 Nov 2025 15:34:23 +0000 (16:34 +0100)] 
tool: consider (some) curl_easy_setopt errors fatal

Instead of happily ignoring return codes.

Calls that allocate data, like duplicating strings, can fail because of
lack of memory which could then leave the option unset and curl would
unknowingly continue (if the memory shortage was momentary).

Closes #19385

5 weeks agombedtls: fix potential use of uninitialized `nread`
Daniel Stenberg [Fri, 7 Nov 2025 09:39:26 +0000 (10:39 +0100)] 
mbedtls: fix potential use of uninitialized `nread`

When Curl_conn_cf_recv() returns error, the variable might not be
assigned and the tracing output may (harmlessly) use it uninitialized.

Also add a comment about the typecast from size_t to int being fine.

Pointed out by ZeroPath

Closes #19393

5 weeks agosetopt: when setting bad protocols, don't store them
Daniel Stenberg [Thu, 6 Nov 2025 22:39:56 +0000 (23:39 +0100)] 
setopt: when setting bad protocols, don't store them

Both CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR would
previously return error on bad input but would wrongly still store and
keep the partial (unacceptable) result in the handle.

Closes #19389

5 weeks agotool_paramhlp: refuse --proto remove all protocols
Daniel Stenberg [Thu, 6 Nov 2025 22:14:04 +0000 (23:14 +0100)] 
tool_paramhlp: refuse --proto remove all protocols

curl is for transfers so disabling all protocols has to be a mistake.
Previously it would allow this to get set (even if curl_easy_setopt()
returns an error for it) and then let libcurl return error instead.

Updated 1474 accordingly.

Closes #19388

5 weeks agoGHA/macos: replace deleted gcc-12 with gcc-13/gcc-14
Viktor Szakats [Thu, 6 Nov 2025 20:10:12 +0000 (21:10 +0100)] 
GHA/macos: replace deleted gcc-12 with gcc-13/gcc-14

GitHub dropped gcc-12 for the remaining two macos runner images.
Replace it with gcc-13 in normal jobs, and gcc-14 in combination jobs.

Ref: https://github.com/actions/runner-images/commit/f7e2c3f34b4985282b39ba42de9f6862a2f8a242
Ref: https://github.com/actions/runner-images/pull/13249

Ref: https://github.com/actions/runner-images/commit/1c1351b6350d920e6c5c524f3eb80cc48c8069a4
Ref: https://github.com/actions/runner-images/pull/13253

Closes #19387

5 weeks agotests: replace remaining CR bytes with the new macro `%CR`
Viktor Szakats [Mon, 3 Nov 2025 20:38:35 +0000 (21:38 +0100)] 
tests: replace remaining CR bytes with the new macro `%CR`

There is no more mixed-newline file in the repository after this patch.
Except for`.bat` and `.sln` files (4 in total), all files use LF
newlines.

Also:
- `spacecheck.pl`: drop mixed-EOL exception for test data.
- runtests: add option `-w` to check if test data has stray CR bytes in
  them.
- build: enable the option above in test targets, except the CI-specific
  one where `spacecheck.pl` does this job already.
- tested OK (with expected failures) in CI with stray CRs added.
- cmake: enable option `-a` for the `tests` target. To continue testing
  after a failed test.

Follow-up to 63e9721b63d01518db83a664bc1e8373c352879e #19313
Follow-up to 6cf3d7b1b161bc45501d17b401225befe3c43943 #19318
Follow-up to 4d2a05d3fe8ba4db9168b03057029ea5ce7dab77 #19284

Closes #19347

5 weeks agowolfSSL: able to differentiate between IP and DNS in alt names
Juliusz Sosinowicz [Tue, 4 Nov 2025 17:39:43 +0000 (18:39 +0100)] 
wolfSSL: able to differentiate between IP and DNS in alt names

Fix implemented in https://github.com/wolfSSL/wolfssl/pull/9380

Closes #19364

5 weeks agotool_help: add checks to avoid unsigned wrap around
x2018 [Wed, 5 Nov 2025 15:50:51 +0000 (23:50 +0800)] 
tool_help: add checks to avoid unsigned wrap around

Closes #19377

5 weeks agocurl: fix progress meter in parallel mode
Stefan Eissing [Thu, 6 Nov 2025 11:47:33 +0000 (12:47 +0100)] 
curl: fix progress meter in parallel mode

With `check_finished()` triggered by notifications now, the
`progress_meter()` was no longer called at regular intervals.

Move `progress_meter()` out of `check_finished()` into the perform loop
and event callbacks.

Closes #19383

5 weeks agocmake: disable `CURL_CA_PATH` auto-detection if `USE_APPLE_SECTRUST=ON`
Viktor Szakats [Thu, 6 Nov 2025 01:20:12 +0000 (02:20 +0100)] 
cmake: disable `CURL_CA_PATH` auto-detection if `USE_APPLE_SECTRUST=ON`

Syncing behavior with `CURL_CA_BUNDLE` and autotools.

`/etc/ssl/certs` is empty by default on macOS systems, thus no likely
auto-detection finds something there.

Follow-up to eefd03c572996e5de4dec4fe295ad6f103e0eefc #18703

Closes #19380

5 weeks agoconncache: silence `-Wnull-dereference` on gcc 14 RISC-V 64
Viktor Szakats [Wed, 5 Nov 2025 18:53:30 +0000 (19:53 +0100)] 
conncache: silence `-Wnull-dereference` on gcc 14 RISC-V 64

A false positive that appeared after a recent patch for no reason.

Seen in curl-for-win unity native Linux builds on debian:testing and
debian:trixie with gcc 14.3.0 and 14.2.0 respectively:
```
-- curl version=[8.17.1-DEV]
-- The C compiler identification is GNU 14.2.0
-- Cross-compiling: Linux/x86_64 -> Linux/riscv64
[...]
lib/conncache.c: In function 'Curl_cpool_conn_now_idle':
lib/conncache.c:539:11: error: null pointer dereference [-Werror=null-dereference]
  539 |   if(!data->multi->maxconnects) {
      |       ~~~~^~~~~~~
```
Ref: https://github.com/curl/curl-for-win/actions/runs/19111497271/job/54609512969#step:3:5788

```
-- The C compiler identification is GNU 14.3.0
```
Ref: https://github.com/curl/curl-for-win/actions/runs/19111497271/job/54609512899#step:3:5801

Patch confirmed silencing:
https://github.com/curl/curl-for-win/actions/runs/19112580362/job/54613288202

Follow-up to fbc4d59151dc4a56052f3a92da3682dc97b32148 #19271

Closes #19378

5 weeks agognutls: report accurate error when TLS-SRP is not built-in
Viktor Szakats [Tue, 4 Nov 2025 17:37:49 +0000 (18:37 +0100)] 
gnutls: report accurate error when TLS-SRP is not built-in

With GnuTLS 3.8.0+ the build-time SRP feature detection always succeeds.
It's also disabled by default in these GnuTLS versions.

When using TLS-SRP without it being available in GnuTLS, report
the correct error code `CURLE_NOT_BUILT_IN`, replacing the out of memory
error reported before this patch.

Also add comments to autotools and cmake scripts about this feature
detection property.

Detecting it at build-time would need to run code which doesn't work
in cross-builds. Once curl requires 3.8.0 as minimum, the build-time
checks can be deleted.

```
# before:
curl: (27) gnutls_srp_allocate_client_cred() failed: An unimplemented or disabled feature has been requested.
# after:
curl: (4) GnuTLS: TLS-SRP support not built in: An unimplemented or disabled feature has been requested.
```

Ref: https://github.com/gnutls/gnutls/commit/dab063fca2eecb9ff1db73234108315c5b713756
Ref: https://github.com/gnutls/gnutls/commit/a21e89edacfe4ec3c501b030fff59c11fd20dcf0

Closes #19365

5 weeks agotool_operate: remove redundant condition
Daniel Stenberg [Thu, 6 Nov 2025 08:52:30 +0000 (09:52 +0100)] 
tool_operate: remove redundant condition

And avoid an early return.

Pointed out by CodeSonar

Closes #19381

5 weeks agotool_ipfs: check return codes better
Daniel Stenberg [Thu, 6 Nov 2025 09:00:52 +0000 (10:00 +0100)] 
tool_ipfs: check return codes better

Closes #19382

5 weeks agodocs: fix checksrc `EQUALSPACE` warnings
Viktor Szakats [Wed, 5 Nov 2025 20:21:34 +0000 (21:21 +0100)] 
docs: fix checksrc `EQUALSPACE` warnings

```
docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md:86:16
docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md:139:16
```

Also sync `CURL *` and result variable names with rest of docs.

Follow-up to 6d7e924e80096a7e2cebad16235674fd3d3012af #19375

Closes #19379

5 weeks agotests/Makefile.am: fix 'checksrc' target
Daniel Stenberg [Wed, 5 Nov 2025 14:16:00 +0000 (15:16 +0100)] 
tests/Makefile.am: fix 'checksrc' target

Skip the http and client subdirs as they contain no code to check. The
http clients are in libtests/ now.

Closes #19376

5 weeks agotests: Add tests to validate that path is ignored with -J
Dan Fandrich [Tue, 4 Nov 2025 16:25:41 +0000 (08:25 -0800)] 
tests: Add tests to validate that path is ignored with -J

curl is correctly dropping the Content-Disposition: filename path, but
there was no test ensuring that.

Ref: https://hackerone.com/reports/3408126

5 weeks agoGHA/checksrc: add actionlint, fix or silence issues found
Viktor Szakats [Wed, 5 Nov 2025 01:50:42 +0000 (02:50 +0100)] 
GHA/checksrc: add actionlint, fix or silence issues found

It also does shellcheck on `run:` elements, overlapping with
the homegrown `shellcheck-ci.sh` with the same purpose. But it also does
more and perhaps could replace the script too, especially in curl
sub-repos.

Also:
- GHA/macos: delete potentially useful, but commented, and ultimately
  unused, non-default Xcode-testing logic. It's causing unused matrix
  exceptions, upsetting actionlint.

Ref: https://github.com/rhysd/actionlint

Closes #19373

5 weeks agotests: shorten space and tab macro names
Viktor Szakats [Tue, 4 Nov 2025 03:05:19 +0000 (04:05 +0100)] 
tests: shorten space and tab macro names

Easier to write and read.

Follow-up to d29f14b9cf0d38f3887b6eadc71af16903bc7f5b #19300

Closes #19349

5 weeks agoDockerfile: update debian:bookworm-slim digest to 936abff
renovate[bot] [Tue, 4 Nov 2025 10:52:26 +0000 (10:52 +0000)] 
Dockerfile: update debian:bookworm-slim digest to 936abff

Closes #19348

5 weeks agochecksrc.pl: detect assign followed by more than one space
Daniel Stenberg [Wed, 5 Nov 2025 13:40:18 +0000 (14:40 +0100)] 
checksrc.pl: detect assign followed by more than one space

And fix some code previously doing this.

Closes #19375

5 weeks agotests: remove trailing spaces in server responses
Daniel Stenberg [Wed, 5 Nov 2025 13:30:41 +0000 (14:30 +0100)] 
tests: remove trailing spaces in server responses

Allows us to drop lots of %spc% from test cases making them easier on
the eye.

Closes #19374

5 weeks agoopenssl: remove code handling default version
Daniel Stenberg [Tue, 4 Nov 2025 09:17:28 +0000 (10:17 +0100)] 
openssl: remove code handling default version

Since it is no longer actually kept as default internally, that's just
dead code.

Follow-up to 9d8998c99408e1adf8eba629fad9f
Closes #19354

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 5 Nov 2025 13:12:23 +0000 (14:12 +0100)] 
RELEASE-NOTES: synced

bumped to 8.17.1 for now

fixed typo in THANKS-filter

5 weeks agogtls: add return checks and optimize the code
x2018 [Tue, 4 Nov 2025 18:16:54 +0000 (02:16 +0800)] 
gtls: add return checks and optimize the code

This commit does the following things:

1. Update the description of gtls_init()

2. In gtls_client_init(), check the invaild SSLVERSION at first. Note
   that this part refactors the duplicate/incompatible checks and removes
   the useless local variable `sni`.

3. Check the return value of gnutls_ocsp_resp_init(). Although the
   original code is safe because gnutls_ocsp_resp_import() will check
   the validity of `ocsp_resp`, it is better to catch the error in time
   and record the proper message to output log.

Closes #19366

5 weeks agolib: cleanup for some typos about spaces and code style
x2018 [Wed, 5 Nov 2025 07:28:56 +0000 (15:28 +0800)] 
lib: cleanup for some typos about spaces and code style

Closes #19370

5 weeks agom4/sectrust: fix test(1) operator
Thomas Klausner [Wed, 5 Nov 2025 09:10:03 +0000 (10:10 +0100)] 
m4/sectrust: fix test(1) operator

'=' is the operator defined by POSIX, only bash supports '=='

Closes #19371

5 weeks agoGHA/non-native: revert to OpenBSD 7.7 due to test hangs with 7.8
Viktor Szakats [Wed, 5 Nov 2025 09:18:32 +0000 (10:18 +0100)] 
GHA/non-native: revert to OpenBSD 7.7 due to test hangs with 7.8

test 701 (SOCKS5) and 708 (SOCKS4) started hanging occasionally, and
most likely others too.

https://github.com/curl/curl/actions/runs/19081279902/job/54510279013 (701 hangs) https://github.com/curl/curl/actions/runs/19095657593/job/54555001348?pr=19370 (708 hangs)
https://github.com/curl/curl/actions/runs/19097996671/job/54562669865?pr=19371 (unknown test hangs)

Reverts c3b890b2c005401e18b54dacf9e63d33412e2b4f #19368

Closes #19372

5 weeks agoGHA/windows: switch a dl-mingw job to skeeto/w64devkit gcc 15.1.0
Viktor Szakats [Tue, 4 Nov 2025 23:57:21 +0000 (00:57 +0100)] 
GHA/windows: switch a dl-mingw job to skeeto/w64devkit gcc 15.1.0

To add another, so far untested standalone toolchain variant to the mix.
This distro is a fairly compact, GCC mingw-w64.

Replacing an existing 15.0.1 snapshot toolchain build job.

Ref: https://github.com/skeeto/w64devkit/releases

Closes #19369

6 weeks agoRELEASE-NOTES: synced curl-8_17_0
Daniel Stenberg [Mon, 3 Nov 2025 21:41:16 +0000 (22:41 +0100)] 
RELEASE-NOTES: synced

version 8.17.0 relese

6 weeks agoVERSIONS: 8.18.0 is now pending
Daniel Stenberg [Wed, 5 Nov 2025 06:59:38 +0000 (07:59 +0100)] 
VERSIONS: 8.18.0 is now pending

6 weeks agoTHANKS: add contributors from 8.17.0
Daniel Stenberg [Wed, 5 Nov 2025 06:57:10 +0000 (07:57 +0100)] 
THANKS: add contributors from 8.17.0

6 weeks agoGHA/non-native: bump to OpenBSD 7.8
Viktor Szakats [Tue, 4 Nov 2025 20:01:32 +0000 (21:01 +0100)] 
GHA/non-native: bump to OpenBSD 7.8

Follow-up to e5cc5640b37672bd18d7561bc45c5dd91271753a #19367

Closes #19368

6 weeks agoGHA: update cross-platform-actions/action action to v0.30.0
renovate[bot] [Tue, 4 Nov 2025 19:41:30 +0000 (19:41 +0000)] 
GHA: update cross-platform-actions/action action to v0.30.0

Closes #19367

6 weeks agogtls: check the return value of gnutls_pubkey_init()
x2018 [Tue, 4 Nov 2025 15:27:49 +0000 (23:27 +0800)] 
gtls: check the return value of gnutls_pubkey_init()

Closes #19362

6 weeks agocmake: fix `HAVE_GNUTLS_SRP` detection after adding local FindGnuTLS module
Viktor Szakats [Tue, 4 Nov 2025 14:26:29 +0000 (15:26 +0100)] 
cmake: fix `HAVE_GNUTLS_SRP` detection after adding local FindGnuTLS module

When GnuTLS is detected via pkg-config on a non-default path, e.g. with
Homebrew arm64 (`/opt/homebrew/`).

This was a regression from a commit made in this release cycle.

The Find module doesn't return an absolute path to the detected library
(as the former solution did), but a bare libname and a libpath. We thus
need to explicitly use the libpath while detecting a feature in GnuTLS
found this way. Syncing this with other dependencies.

Follow-up to 1966c86d71eb90beeeb3ccbefd6321bd64992553 #19163

Closes #19360

6 weeks agoHISTORY: extend
Daniel Stenberg [Tue, 4 Nov 2025 15:10:09 +0000 (16:10 +0100)] 
HISTORY: extend

With recent events and some more in the past

Closes #19361

6 weeks agowcurl: import v2025.11.04
Samuel Henrique [Tue, 4 Nov 2025 08:33:28 +0000 (08:33 +0000)] 
wcurl: import v2025.11.04

Closes #19353

6 weeks agotool_ipfs: check the return value of curl_url_get for gwpath
x2018 [Tue, 4 Nov 2025 08:49:28 +0000 (16:49 +0800)] 
tool_ipfs: check the return value of curl_url_get for gwpath

Closes #19358

6 weeks agotests: remove most user-agent filters
Daniel Stenberg [Tue, 4 Nov 2025 10:22:32 +0000 (11:22 +0100)] 
tests: remove most user-agent filters

Use the %VERSION instead. The user-agent stripping was introduced at the
time before we had %VERSION (introduced in e6b21d4). The tests would
then remove the user-agent header to make them possible to be compared
in a version independent way.

Fixes #19355
Reported-by: Stefan Eissing
Closes #19356

6 weeks agoCURLOPT_COPYPOSTFIELDS.md: used with MQTT and RTSP as well
Daniel Stenberg [Tue, 4 Nov 2025 07:44:28 +0000 (08:44 +0100)] 
CURLOPT_COPYPOSTFIELDS.md: used with MQTT and RTSP as well

Follow-up to 5ec87346a9bfad1a24f97c3785

Closes #19351

6 weeks agoBINDINGS: change dead link to archive.org version
Daniel Stenberg [Tue, 4 Nov 2025 07:50:11 +0000 (08:50 +0100)] 
BINDINGS: change dead link to archive.org version

The Hollywood binding host name www.hollywood-mal.com does not seem to
work anymore.

Closes #19352

6 weeks agoREADME.md: use the first paragraph from the man page
Daniel Stenberg [Mon, 3 Nov 2025 13:40:36 +0000 (14:40 +0100)] 
README.md: use the first paragraph from the man page

Which also mentions all protocols

Closes #19335