]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 weeks agoCI: bump Circle CI jobs to Ubuntu 22.04 runners for OpenSSL 3
Viktor Szakats [Sat, 15 Nov 2025 23:18:31 +0000 (00:18 +0100)] 
CI: bump Circle CI jobs to Ubuntu 22.04 runners for OpenSSL 3

Ref: https://packages.ubuntu.com/jammy/libssl-dev

Follow-up to 69c89bf3d3137fcbb2b8bc57233182adcf1e2817 #18330

Closes #19546

2 weeks agoDEPRECATE.md: move OpenSSL to past removals (fixup)
Viktor Szakats [Sat, 15 Nov 2025 21:32:56 +0000 (22:32 +0100)] 
DEPRECATE.md: move OpenSSL to past removals (fixup)

Follow-up to bb213bd76915368ac49c5db9da9d6462c6b8e6cf #19542

2 weeks agoDEPRECATE.md: move OpenSSL to past removals
Viktor Szakats [Sat, 15 Nov 2025 18:33:37 +0000 (19:33 +0100)] 
DEPRECATE.md: move OpenSSL to past removals

Follow-up to 69c89bf3d3137fcbb2b8bc57233182adcf1e2817 #18330

Closes #19542

2 weeks agoopenssl: bump minimum OpenSSL version to 3.0.0
Viktor Szakats [Tue, 26 Aug 2025 22:54:22 +0000 (00:54 +0200)] 
openssl: bump minimum OpenSSL version to 3.0.0

It also means that all supported OpenSSL versions and forks support
TLSv1.3 after this patch.

It reduces `openssl.c` size by more than 10%, or 400 LOC.

Ref: #18822
Closes #18330

2 weeks agobuild: drop support for VS2008 (Windows)
Viktor Szakats [Sun, 13 Jul 2025 10:57:26 +0000 (12:57 +0200)] 
build: drop support for VS2008 (Windows)

Require Visual Studio 2010 or newer.

Ref: https://github.com/curl/curl/discussions/15972

Follow-up to dc28bb86c1e466c667ce220fd2e51355cd8bae8d #17798
Follow-up to 63e513b106113db0b1b68bab347b80cb4cef4e65 #17380

Closes #17931

2 weeks agobuild: drop Windows CE / CeGCC support
Viktor Szakats [Mon, 14 Jul 2025 22:36:08 +0000 (00:36 +0200)] 
build: drop Windows CE / CeGCC support

Windows CE support was limited to successful builds with ming32ce
(a toolchain that hasn't seen an update since 2009, using an ancient gcc
version and "old mingw"-style SDK headers, that curl deprecated earlier).
Builds with MSVC were broken for a long time. mingw32ce builds were never
actually tested and runtime and unlikely to work due to missing stubs.
Windows CE toolchains also miss to comply with C89. Paired with lack of
demand and support for the platform, curl deprecated it earlier.

This patch removes support from the codebase to ease maintaining Windows
codepaths.

Follow-up to f98c0ba834d4b4da480373b732a86976f9064ccd #17924
Follow-up to 8491e6574cde770b227ca0e1cd66548291f49661 #17379
Follow-up to 2a292c39846107228201674d686be5b3ed96674d #15975

Closes #17927

2 weeks agobadwords: check indented lines in source code, fix fallouts
Viktor Szakats [Fri, 14 Nov 2025 16:55:33 +0000 (17:55 +0100)] 
badwords: check indented lines in source code, fix fallouts

- badwords.pl: add `-a` option to check all lines in source code files.
  Before this patch indented lines were skipped (to avoid Markdown code
  fences.)
- GHA/checksrc: use `-a` when verifying the source code.
- GHA/checksrc: disable `So` and `But` rules for source code.
- GHA/checksrc: add docs/examples to the verified sources.
- badwords.txt: delete 4 duplicates.
- badwords.txt: group and sort contractions.
- badwords.txt: allow ` url = `, `DIR`, `<file name`.

Closes #19536

2 weeks agomk-ca-bundle.pl: default to SHA256 fingerprints with `-t` option
Viktor Szakats [Tue, 4 Nov 2025 11:55:25 +0000 (12:55 +0100)] 
mk-ca-bundle.pl: default to SHA256 fingerprints with `-t` option

Replacing previous default: MD5.

You can use the existing `-s` option to override the default.

Also bump version to 1.30.

Closes #19359

2 weeks agobadwords.pl: fix variable in printf mask
Viktor Szakats [Fri, 14 Nov 2025 16:57:03 +0000 (17:57 +0100)] 
badwords.pl: fix variable in printf mask

Causing warnings if a matched line has mask patterns.

Closes #19534

2 weeks agodocs: fix checksrc warning, fix checkdocs CI filter
Viktor Szakats [Fri, 14 Nov 2025 16:09:50 +0000 (17:09 +0100)] 
docs: fix checksrc warning, fix checkdocs CI filter

Also:
- GHA/checkdocs: fix CI filters to catch it early.
  Follow-up to 28dd14aafe2692a3e7dceb40340554c03c127cf1 #15797

Closes #19533

2 weeks agobadwords: fix two exceptions and drop them
Viktor Szakats [Fri, 14 Nov 2025 15:58:05 +0000 (16:58 +0100)] 
badwords: fix two exceptions and drop them

Also:
- extend `dir` rule to exclude C assignments.

Closes #19532

2 weeks agoGHA/checksrc: check XML files for errors
Viktor Szakats [Fri, 14 Nov 2025 14:39:40 +0000 (15:39 +0100)] 
GHA/checksrc: check XML files for errors

Closes #19528

2 weeks agolimit-rate: add example using --limit-rate and --max-time together
nait-furry [Tue, 11 Nov 2025 22:51:37 +0000 (01:51 +0300)] 
limit-rate: add example using --limit-rate and --max-time together

Closes #19473

2 weeks agotest07_22: fix flakiness
Stefan Eissing [Fri, 14 Nov 2025 15:26:14 +0000 (16:26 +0100)] 
test07_22: fix flakiness

The HTTP/3 tests did send 20 transfers against nghttpx with a backend
that failed the uploads with a 400 and an incomplete response body. This
causes stream resets.

Apache keeps the connection open, but newer nghttpx closes the front
connection after "too many" reset. When that bites, it depends on the
number of transfers ongoing how the test case fails. This led to flaky
outcomes.

Reduce the transfers to just a single one and check the result of
that one. Parallelism is not important here.

refs #19489
Closes #19530

2 weeks agovquic-tls/gnutls: call Curl_gtls_verifyserver unconditionally
Daniel Stenberg [Fri, 14 Nov 2025 15:42:23 +0000 (16:42 +0100)] 
vquic-tls/gnutls: call Curl_gtls_verifyserver unconditionally

Closes #19531

2 weeks agocf-socket: trace ignored errors
Stefan Eissing [Fri, 14 Nov 2025 13:18:12 +0000 (14:18 +0100)] 
cf-socket: trace ignored errors

Instead of blasting the user with infof() statements.

Reported-by: Aleksandr Sergeev
Fixes #19520
Closes #19527

2 weeks agovtls: pinned key check
Stefan Eissing [Fri, 14 Nov 2025 14:25:04 +0000 (15:25 +0100)] 
vtls: pinned key check

Cleanup the vtls pinned key matching somewhat. Add a DEBUGF
for pinned key hashes that do not match, so we can see in
traces what was going on.

Ref #19489
Closes #19529

2 weeks agogetinfo: improve perf in debug mode
Stefan Eissing [Fri, 14 Nov 2025 11:45:58 +0000 (12:45 +0100)] 
getinfo: improve perf in debug mode

Save some cpu cycles in debug mode for getinfo. Look up env vars for
overwriting variables only when variables are actually requested.

Closes #19525

2 weeks agoconnect: reshuffle Curl_timeleft_ms to avoid 'redundant condition'
Daniel Stenberg [Fri, 14 Nov 2025 09:52:43 +0000 (10:52 +0100)] 
connect: reshuffle Curl_timeleft_ms to avoid 'redundant condition'

Line 143: "if(duringconnect)" would always equal true. While this is
harmless, I believe this minor tweak makes the flow slightly more
obvious to the reader and avoids the redundant condition.

Pointed out by CodeSonar

Closes #19523

2 weeks agoexamples/multithread: fix race condition
Stefan Eissing [Fri, 14 Nov 2025 11:51:31 +0000 (12:51 +0100)] 
examples/multithread: fix race condition

Reported-by: Nick Korepanov
Fixes #19524
Closes #19526

2 weeks agoDEPRECATE: remove RTMP support in April 2026
Daniel Stenberg [Mon, 10 Nov 2025 08:59:25 +0000 (09:59 +0100)] 
DEPRECATE: remove RTMP support in April 2026

URL: https://curl.se/mail/lib-2025-11/0008.html

2 weeks agoconfig2setopts: bail out if curl_url_get() returns OOM
Daniel Stenberg [Thu, 13 Nov 2025 22:03:52 +0000 (23:03 +0100)] 
config2setopts: bail out if curl_url_get() returns OOM

Closes #19518

2 weeks agocurl_setup.h: drop stray `#undef stat` (Windows)
Viktor Szakats [Thu, 13 Nov 2025 22:47:10 +0000 (23:47 +0100)] 
curl_setup.h: drop stray `#undef stat` (Windows)

Follow-up to 9678ff5b1bfea1c847aee4f9edf023e8f01c9293 #18776

Closes #19519

2 weeks agotidy-up: result code variable names in tests and examples
Viktor Szakats [Thu, 13 Nov 2025 19:31:51 +0000 (20:31 +0100)] 
tidy-up: result code variable names in tests and examples

Sync outliers with the rest of the code.

Also:
- return error in some failed init cases, instead of `CURLE_OK`:
  1908, 1910, 1913, 2082, 3010
- lib1541: delete unused struct member.

Closes #19515

2 weeks agoconfig2setopts: exit if curl_url_set() fails on OOM
Daniel Stenberg [Thu, 13 Nov 2025 21:24:32 +0000 (22:24 +0100)] 
config2setopts: exit if curl_url_set() fails on OOM

An error case that previously did not properly return error.

Closes #19517

2 weeks agochecksrc: verify close brace indent level
Daniel Stenberg [Tue, 11 Nov 2025 14:52:33 +0000 (15:52 +0100)] 
checksrc: verify close brace indent level

Closes #19512

2 weeks agocode: minor indent fixes before closing braces
Daniel Stenberg [Thu, 13 Nov 2025 12:50:49 +0000 (13:50 +0100)] 
code: minor indent fixes before closing braces

Closes #19512

2 weeks agotool_operate: exit on curl_share_setopt errors
Daniel Stenberg [Thu, 13 Nov 2025 15:26:24 +0000 (16:26 +0100)] 
tool_operate: exit on curl_share_setopt errors

Continuing when one of these has failed is fragile and error-prone.

Closes #19513

2 weeks agosws: repair --port, and accept any port
Daniel Stenberg [Thu, 13 Nov 2025 15:39:10 +0000 (16:39 +0100)] 
sws: repair --port, and accept any port

Also for mqttd and sockfilt. The < 1025 check was not serving any
purpose.

Follow-up to bb1391f94394e635c1a5c58253e7a3d3b36bde57

2 weeks agochecksrc: disallow `atoi` and `atol` globally
Viktor Szakats [Wed, 12 Nov 2025 22:37:06 +0000 (23:37 +0100)] 
checksrc: disallow `atoi` and `atol` globally

No longer used in core and test code.

Also: allowlist in docs/examples.

Closes #19508

2 weeks agotests/server: replace `atoi()` and `atol()` with `curlx_str_number()`
Viktor Szakats [Thu, 13 Nov 2025 11:46:59 +0000 (12:46 +0100)] 
tests/server: replace `atoi()` and `atol()` with `curlx_str_number()`

Closes #19510

2 weeks agowolfssl: simplify wssl_send_earlydata
Daniel Stenberg [Thu, 13 Nov 2025 12:19:01 +0000 (13:19 +0100)] 
wolfssl: simplify wssl_send_earlydata

Move out logic from a switch() expression and return error directly
instead of using goto. This also removes the odd-looking two subsequent
closing braces at the same indent level.

Closes #19509

2 weeks agolib: eliminate size_t casts
Stefan Eissing [Wed, 12 Nov 2025 14:58:49 +0000 (15:58 +0100)] 
lib: eliminate size_t casts

Add new functions in `curlx/warnless.h` for controlled type
conversions:

* curlx_uitouz, convert unsigned into to size_t (should always work)
* curlx_uztoso, convert size_t to curl_off_t, capping at CURL_OFF_T_MAX
* curlx_sztouz, convert ssize_t to size_t, return TRUE when ok
* curlx_sotouz_range, convert curl_off_t to size_t interval, capping
  values to interval bounds

Remove some unnecesary casts, convert some internal recv functions
to the "return result, have size_t* arg" pattern.

Closes #19495

2 weeks agolib: rename curlx_timediff to curlx_timeleft_ms
Stefan Eissing [Wed, 12 Nov 2025 11:15:42 +0000 (12:15 +0100)] 
lib: rename curlx_timediff to curlx_timeleft_ms

Rename `Curl_timeleft()` to `Curl_timeleft_ms()` to make the units in
the returned `timediff_t` clear. (We used to always have ms there, but
with QUIC started to sometimes calc ns as well).

Rename some assigned vars without `_ms` suffix for clarity as well.

Closes #19486

2 weeks agotests/data: add `%includetext`, dedupe XML payloads into external file
Viktor Szakats [Thu, 13 Nov 2025 01:11:48 +0000 (02:11 +0100)] 
tests/data: add `%includetext`, dedupe XML payloads into external file

To reduce duplication and to avoid keeping XML-like markup within XML
markup (`test*`), that was tripping `xmllint`.

Ref: #19470

Closes #19504

2 weeks agoRELEASE-NOTES: codespell
Viktor Szakats [Thu, 13 Nov 2025 10:46:13 +0000 (11:46 +0100)] 
RELEASE-NOTES: codespell

2 weeks agoruntests: add missing Perl semicolon
Viktor Szakats [Thu, 13 Nov 2025 03:44:15 +0000 (04:44 +0100)] 
runtests: add missing Perl semicolon

Follow-up to f477f3efc3ec58f7effc2aa01e7f4565b12be976 #19398

Closes #19507

2 weeks agolibtests: replace `atoi()` with `curlx_str_number()`
Viktor Szakats [Thu, 13 Nov 2025 02:40:42 +0000 (03:40 +0100)] 
libtests: replace `atoi()` with `curlx_str_number()`

Also:
- lib1568: fail in global initialization error.

Closes #19506

2 weeks agoFILEFORMAT.md: drop some text from the `command` section
Viktor Szakats [Wed, 12 Nov 2025 22:20:58 +0000 (23:20 +0100)] 
FILEFORMAT.md: drop some text from the `command` section

Special meanings of URLs became outdated, and it's also no longer
necessary to pass the test number via the URL or domain anymore.
Delete the text.

Follow-up to c6f1b0ff49268817101ac1734f43074fcc8775b2 #19429

Closes #19503

2 weeks agocookie: propagate errors better, cleanup the internal API
Daniel Stenberg [Wed, 12 Nov 2025 12:16:33 +0000 (13:16 +0100)] 
cookie: propagate errors better, cleanup the internal API

Overhaul of the internal cookie APIs and an attempt to better return
errors for OOM and similar critical problems, separate from ordinary and
benign parsing problems.

Closes #19493

2 weeks agoschannel: replace atoi() with curlx_str_number()
Daniel Stenberg [Wed, 12 Nov 2025 10:27:36 +0000 (11:27 +0100)] 
schannel: replace atoi() with curlx_str_number()

The last atoi() call removed from libcurl

Closes #19483

2 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 13 Nov 2025 07:49:49 +0000 (08:49 +0100)] 
RELEASE-NOTES: synced

curlver: 8.18.0 is the next planned release version

2 weeks agoruntests: allow `client/command` to span multiple lines, and use it
Viktor Szakats [Wed, 12 Nov 2025 16:26:27 +0000 (17:26 +0100)] 
runtests: allow `client/command` to span multiple lines, and use it

Some curl command-lines are long, often repetitive, and difficult
to read or write:

Before this patch (1 test == 1 line):
- <=78 characters: 1099 tests
- 79-132 characters: 500 tests
- 133+ characters: 217 tests: patch meant to help with some of these.

After this patch:
- <=78 characters: 1288 lines
- 79-132 characters: 526 lines
- 133+ characters: 190 lines

After this patch it's possible to fold long lines into multiple ones.
Folding can reduce greppability, thus this is primarily useful for cases
when the options are repetitive, e.g. a list of form options, headers,
mail parameters and the like.

Closes #19500

2 weeks agoOS400: fix build
Patrick Monnerat [Wed, 12 Nov 2025 14:45:59 +0000 (15:45 +0100)] 
OS400: fix build

- Fix failed build due to missing parameter.

Follow-up to 8c9946d3 from yesterday.

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

2 weeks ago_PROGRESS.md: add the E unit, mention kibibyte
Daniel Stenberg [Wed, 12 Nov 2025 22:15:37 +0000 (23:15 +0100)] 
_PROGRESS.md: add the E unit, mention kibibyte

The suffixes used are not standard since we want them to be single
characters and the proper ones would be KiB, MiB etc.

Closes #19502

2 weeks agotest716: use `repeat` macro
Viktor Szakats [Wed, 12 Nov 2025 19:34:53 +0000 (20:34 +0100)] 
test716: use `repeat` macro

Closes #19501

2 weeks agotests/data: use more `repeat` macro
Viktor Szakats [Wed, 12 Nov 2025 17:16:55 +0000 (18:16 +0100)] 
tests/data: use more `repeat` macro

Found in `client/command` sections.

Closes #19499

2 weeks agotest2045: replace HTML multi-line comment markup with `#` comments
Viktor Szakats [Wed, 12 Nov 2025 16:41:54 +0000 (17:41 +0100)] 
test2045: replace HTML multi-line comment markup with `#` comments

As used everywhere else in tests/data. To play nice with XML.

Follow-up to 9756d1da7637d1913b7ca2b589e4635f32ed3e00

Closes #19498

2 weeks agotest1404, 1547: replace `&` char in comment and name for XML-friendliness
Viktor Szakats [Wed, 12 Nov 2025 15:36:14 +0000 (16:36 +0100)] 
test1404, 1547: replace `&` char in comment and name for XML-friendliness

Closes #19497

2 weeks agotest1554: make test output XML-friendly
Viktor Szakats [Wed, 12 Nov 2025 15:05:52 +0000 (16:05 +0100)] 
test1554: make test output XML-friendly

Meaning no `<` and `>` characters.
Reducing the number of `xmllint` failures by 1.

Closes #19496

2 weeks agotest557: avoid `&` symbol in test output to be XML-friendly
Viktor Szakats [Tue, 11 Nov 2025 20:51:06 +0000 (21:51 +0100)] 
test557: avoid `&` symbol in test output to be XML-friendly

Closes #19492

2 weeks agotest363: delete stray character (typo) from a section tag
Viktor Szakats [Wed, 12 Nov 2025 14:21:27 +0000 (15:21 +0100)] 
test363: delete stray character (typo) from a section tag

Did not cause an issue in runtests. Caught by `xmllint`.

Follow-up to 63e9721b63d01518db83a664bc1e8373c352879e #19313

Closes #19490

2 weeks agotests/data: avoid tag markup in comments
Viktor Szakats [Wed, 12 Nov 2025 14:40:44 +0000 (15:40 +0100)] 
tests/data: avoid tag markup in comments

To avoid confusing `xmllint`, and reducing the number of files failing
`xmllint --format` from 169 to 144.

Closes #19491

2 weeks agotest2405: split off H2 tests to new test 2407, fix callback prototype
Viktor Szakats [Wed, 12 Nov 2025 09:27:36 +0000 (10:27 +0100)] 
test2405: split off H2 tests to new test 2407, fix callback prototype

To untangle the different curl/server requirements of these tests.
Also to make this test run for non-H2 builds. Searching the cause of
the flakiness documented in #19481.

Also:
- fix the callback function prototype. Detected by ASAN with this patch,
  though the issue was pre-existing.
  ```
  lib/cw-out.c:211:14: runtime error: call to function emptyWriteFunc
    through pointer to incorrect function type
    'unsigned long (*)(char *, unsigned long, unsigned long, void *)'
  tests/libtest/lib2405.c:72: note: emptyWriteFunc defined here
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior lib/cw-out.c:211:14
  ```
  Ref: https://github.com/curl/curl/actions/runs/19296686908/job/55180334364?pr=19487#step:44:3768

Follow-up to 96a5ce5a82eb0f08650649ffafb7bb4e51fc4444 #19481

Closes #19487

2 weeks agolib1509: make callbacks static
Viktor Szakats [Wed, 12 Nov 2025 12:30:12 +0000 (13:30 +0100)] 
lib1509: make callbacks static

Closes #19488

2 weeks agotest2405: report `fd_count*` variables on failure
Viktor Szakats [Wed, 12 Nov 2025 09:17:48 +0000 (10:17 +0100)] 
test2405: report `fd_count*` variables on failure

This test is frequently failing in macOS !ssl jobs:

"curl_multi_waitfds() should return at least the number of fds needed":
https://github.com/curl/curl/actions/runs/19290229745/job/55159015942 AM clang !ssl !debug brotli zstd
https://github.com/curl/curl/actions/runs/19289578332/job/55157058146 AM clang !ssl !debug brotli zstd
https://github.com/curl/curl/actions/runs/19188515879/job/54859474947 AM clang !ssl
https://github.com/curl/curl/actions/runs/19165077858/job/54783776869 AM clang !ssl libssh2 AppleIDN
https://github.com/curl/curl/actions/runs/19046554157/job/54396096298 AM gcc-12 !ssl !debug

"curl_multi_waitfds() should return the amount of fds needed if enough isn't passed in":
https://github.com/curl/curl/actions/runs/19184546172/job/54848549080 AM gcc-13 !ssl !debug

Also high on the test clutch list:
2405 FAIL times: 165
Ref: https://testclutch.curl.se/static/reports/results-count.html

```
libtests returned 44, when expecting 0

FAIL 2405: 'checking curl_multi_waitfds functionality' multi, HTTP, HTTP/2
```
44 = `CURLE_OBSOLETE44` = `TEST_ERR_FAILURE`

Also: fix a newline in log output.

Follow-up to c78044c07e97cb720049579f4fe3cab33a7ea8d3 #15146 #15155

Closes #19481

2 weeks agohostip: don't store negative lookup on OOM
Daniel Stenberg [Wed, 12 Nov 2025 10:59:25 +0000 (11:59 +0100)] 
hostip: don't store negative lookup on OOM

When convert_ipaddr_direct() returns error due to OOM, it must not be
stored as a negative cache result.

Closes #19484

2 weeks agoOS400/makefile.sh: fix shellcheck warning SC2038 differently
Viktor Szakats [Wed, 12 Nov 2025 08:50:10 +0000 (09:50 +0100)] 
OS400/makefile.sh: fix shellcheck warning SC2038 differently

Reported-by: Patrick Monnerat
Bug: https://github.com/curl/curl/pull/19451#discussion_r2517335957
Follow-up to af5a1647afa8aaf7cafc1e87af529a4cd48cb240 #19451

Closes #19482

2 weeks agolibssh2: replace atoi() in ssh_force_knownhost_key_type
Daniel Stenberg [Wed, 12 Nov 2025 07:49:13 +0000 (08:49 +0100)] 
libssh2: replace atoi() in ssh_force_knownhost_key_type

Closes #19479

2 weeks agolibssh2: cleanup ssh_force_knownhost_key_type
Daniel Stenberg [Wed, 12 Nov 2025 07:45:56 +0000 (08:45 +0100)] 
libssh2: cleanup ssh_force_knownhost_key_type

- Use arrays instead pointers
- Narrow variable scopes

Closes #19479

2 weeks agohttp: replace atoi use in Curl_http_follow with curlx_str_number
Daniel Stenberg [Wed, 12 Nov 2025 07:38:45 +0000 (08:38 +0100)] 
http: replace atoi use in Curl_http_follow with curlx_str_number

In an attempt to weed out atoi() use all over.

Closes #19478

2 weeks agotelnet: replace atoi for BINARY handling with curlx_str_number
Daniel Stenberg [Wed, 12 Nov 2025 07:32:31 +0000 (08:32 +0100)] 
telnet: replace atoi for BINARY handling with curlx_str_number

Also, only consider 0 to be a valid switch-off. Previously any value
except 1 had the same effect.

Closes #19477

2 weeks agonoproxy: replace atoi with curlx_str_number
Daniel Stenberg [Wed, 12 Nov 2025 07:17:48 +0000 (08:17 +0100)] 
noproxy: replace atoi with curlx_str_number

To better reject junk and detect overflows. There were already
additional precautions and protections in place, but this is cleaner.

Extended the 1614 unit tests with some more bad syntax cases.

Closes #19475

2 weeks agosrc/checksrc: ban atoi use
Daniel Stenberg [Wed, 12 Nov 2025 08:31:48 +0000 (09:31 +0100)] 
src/checksrc: ban atoi use

2 weeks agotool_operate: use curlx_str_number intead of atoi
Daniel Stenberg [Wed, 12 Nov 2025 08:30:37 +0000 (09:30 +0100)] 
tool_operate: use curlx_str_number intead of atoi

For consistency. This instance is for debug-only code and is not
important.

Closes #19480

2 weeks agobadwords: re-sync with curl-www, fix issues found
Viktor Szakats [Tue, 11 Nov 2025 16:43:06 +0000 (17:43 +0100)] 
badwords: re-sync with curl-www, fix issues found

Also:
- replace `manpage` with `man page`, add to `badwords.txt`.
- badwords.pl: import `-w` feature from curl-www, syncing the two
  scripts fully.
- badwords.txt: import missing items from curl-www, syncing the two
  files fully.
- pyspelling.words: drop `cURL` allowed word.

Closes #19468

2 weeks agoautotools: drop autoconf <2.59 compatibility code (zz60-xc-ovr)
Viktor Szakats [Tue, 11 Nov 2025 14:28:36 +0000 (15:28 +0100)] 
autotools: drop autoconf <2.59 compatibility code (zz60-xc-ovr)

The minimum required autoconf is 2.59, since curl 7.76.0 (2021).

Follow-up to a59f04611629f0db9ad8e768b9def73b9b4d9423 #6748

Closes #19464

2 weeks agomk-ca-bundle.pl: use `open()` with argument list to replace backticks
Viktor Szakats [Tue, 11 Nov 2025 10:09:36 +0000 (11:09 +0100)] 
mk-ca-bundle.pl: use `open()` with argument list to replace backticks

On Windows this requires Perl 5.22 from year 2015.

Also:
- mdlinkcheck: delete redundant error handling logic.
  Follow-up to 77be4a7ab2b5a0c633b9107fd286bda1f57e4725 #19437

Closes #19461

2 weeks agodocs: Line endings are no longer significant in test files 19469/head
Dan Fandrich [Tue, 11 Nov 2025 08:50:52 +0000 (00:50 -0800)] 
docs: Line endings are no longer significant in test files

Since commit f477f3efc, CR/LF characters in test files are no longer
significant, making the files a little more XML-like.

Closes #19469

2 weeks agocf-socket: split out the MTU and GRO setopts into sep functions
Daniel Stenberg [Tue, 11 Nov 2025 15:41:57 +0000 (16:41 +0100)] 
cf-socket: split out the MTU and GRO setopts into sep functions

It simplifies the #ifdefs and declaring of local variables slightly.

Closes #19467

2 weeks agoccsidcurl: make curl_mime_data_ccsid() use the converted size
Daniel Stenberg [Tue, 11 Nov 2025 14:53:07 +0000 (15:53 +0100)] 
ccsidcurl: make curl_mime_data_ccsid() use the converted size

dynconvert() now offers to return the size of the converted data as it
might be different that the provided input size.

Bonus: minor indent fixing of some closing braces.

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

2 weeks agonoproxy: simplify Curl_check_noproxy
Daniel Stenberg [Tue, 11 Nov 2025 15:12:21 +0000 (16:12 +0100)] 
noproxy: simplify Curl_check_noproxy

By creating two separate matching functions for name and IP.

Closes #19466

2 weeks agoftp: remove #ifdef for define that is always defined
Daniel Stenberg [Tue, 11 Nov 2025 13:39:20 +0000 (14:39 +0100)] 
ftp: remove #ifdef for define that is always defined

The CURL_FTP_HTTPSTYLE_HEAD logic was added back in 2007 with the
intention to remove that logic one day, but since we never bump the
SONAME it is not likely to happen anytime soon. Remove again for
readability.

Follow-up to 3217809294b

Closes #19463

2 weeks agowolfssl: avoid NULL dereference in OOM situation
Daniel Stenberg [Tue, 11 Nov 2025 08:06:13 +0000 (09:06 +0100)] 
wolfssl: avoid NULL dereference in OOM situation

Verify that wolfSSL_BIO_meth_new() actually works and handle situations
where it returns NULL.

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

2 weeks agoprogress: show fewer digits
Daniel Stenberg [Sun, 9 Nov 2025 23:46:53 +0000 (00:46 +0100)] 
progress: show fewer digits

Without unit, show up to 99999 "raw" (5 digits). After that, prefer to
show the number as less than 1000 per unit and use single decimal
fraction. Like '123.4M' (spending 6 characters).

This now makes the largest possible size to show 8.0E (exabytes).

Probably makes the output easier to read.

Fixes #19431
Reported-by: Fd929c2CE5fA on github
Closes #19433

2 weeks agocf-https-connect: allocate ctx at first in cf_hc_create()
x2018 [Mon, 10 Nov 2025 16:29:29 +0000 (00:29 +0800)] 
cf-https-connect: allocate ctx at first in cf_hc_create()

Closes #19454

2 weeks agokrb5_sspi: unify a part of error handling
x2018 [Mon, 10 Nov 2025 15:55:02 +0000 (23:55 +0800)] 
krb5_sspi: unify a part of error handling

Closes #19452

2 weeks agorustls: fix a potential memory issue
x2018 [Sun, 9 Nov 2025 16:24:10 +0000 (00:24 +0800)] 
rustls: fix a potential memory issue

Closes #19425

2 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

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

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

3 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

3 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

3 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

3 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

3 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

3 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

3 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