37607 Commits

Author SHA1 Message Date
Daniel Stenberg
03c9215e62 altsvc: accept ma/persist per alternative entry
The 'ma' and 'persist' keywords should be considered per list entry, not
once per header.

Expand test 1654 to verify such headers

Reported-by: Hunt Darlener
Closes #20160
2026-01-02 23:50:21 +01:00
Viktor Szakats
003dddae2b GHA/non-native: reduce workflow timeouts
Closes #20171
2026-01-02 23:43:23 +01:00
Viktor Szakats
9de7001b5e GHA/windows: reduce workflow timeouts
From 15 to 10 minutes.

To reduce the idle wait for hung jobs from 20 to 15 minutes (hopefully),
so that the failed just can be restarted manually eariler. It appears
that GitHub Actions notices a hung job 5 minutes past the workflow
timeout (reason undiscovered).

Also: Leave extra time for torture and arm64 jobs.

Closes #20170
2026-01-02 23:43:23 +01:00
Viktor Szakats
d057b705fd GHA: disable autotools static libcurl in many jobs
To avoid building libcurl in both static and shared flavor by default.
It results in 1.5-2.x speed-up for the curl build step in most jobs.
Saving a total of 6-7 minutes. In the Cygwin job alone it saves 1-1.5m.

Also:
- enable static + shared in a Windows job to keep testing this combo.

Follow-up to ff958fc4b2 #20159

Closes #20167
2026-01-02 22:39:28 +01:00
Viktor Szakats
7e08d56c23 GHA/linux: simplify configuring mbedTLS in two jobs
Closes #20165
2026-01-02 16:34:40 +01:00
Viktor Szakats
2cbcde90e7 GHA/linux: split valgrind jobs to job-pairs for parallelism, to finish in 10m
To make CI turnaround time shorter, by cutting the longest running jobs.
After this patch all jobs should finish around 10-11 minutes. Down from
15-16 minutes before this patch.

Suggested-by: Stefan Eissing

The fuzzing workflow is now the slowest (with a 7-minute startup time
needed to build deps from source on each run), followed by macOS
and Windows torture tests (both split in two now). Without fuzzing, it's
under 10 minutes.

Notes:
- an extra cost with job-pairs is installing prereqs,
  configuring/building curl and tests twice. GitHub doesn't support
  making a matrix job a prereq for another workflow that may fix this:
    https://github.com/orgs/community/discussions/42335
  This overhead is significant on Windows: 11m20 -> 9m20 + 8m40
- job-pairs are annoying to maintain and keep in sync.
- splitting tests into halves is a manual process and needs to be
  revisited from time to time. Possibly something to automate with
  a runtests option, e.g. with `1 of 50%` and `2 of 50%`?

Also:
- split torture tests in two equal pieces, replacing the `FTP` + `!FTP`
  split used earlier.

Related perf improvements from today:
- make scan-build 2x fast:
  ff958fc4b2 #20159
- drop build-only Testi386 fuzz workflow (from curl), saving 9m per run:
  0106023c1f
  https://github.com/curl/curl-fuzzer/pull/236

Closes #20153
2026-01-02 15:51:00 +01:00
Viktor Szakats
ff958fc4b2 GHA/linux: switch scan-build jobs to cmake (for 2x perf)
Somewhat unexpectedly, switching autotools jobs to identical (non-unity,
non-debug, same options) cmake ones, makes them complete 2x faster.
Most of it comes from cmake building shared libcurl only, while autotools
was using defaults and building both, in two separate passes. Thers is
about a minute (per job) of gain due to other reasons.

Before:
MultiSSL: 10m30: https://github.com/curl/curl/actions/runs/20656775456/job/59311070197
H3: 9m14s: https://github.com/curl/curl/actions/runs/20656775456/job/59311070204

After:
MultiSSL: 4m52s: https://github.com/curl/curl/actions/runs/20658343323/job/59315501903
H3: 4m7s: https://github.com/curl/curl/actions/runs/20658343323/job/59315501918
H3: 5m4s: https://github.com/curl/curl/actions/runs/20659294959/job/59318215987 (autotools shared only, for comparison, not merged)

Also:
- drop building examples with scan-build in the second (shorter) job.
  This offers no extra coverage over the long job that has both GnuTLS
  and OpenSSL. Saving an extra ~30s.

Closes #20159
2026-01-02 15:13:53 +01:00
Daniel Stenberg
ae1597c312 VULN-DISCLOSURE-POLICY.md: CRLF in data
we reject the idea of *CRLF injection* by the user itself as a general
security problem

Closes #20157
2026-01-02 12:19:11 +01:00
Daniel Stenberg
ce423079dc progress: make it one column narrower
To make it fit 80 columns appropriately

Reported-by: Jay Satiro
Fixes #20122
Closes #20124
2026-01-02 11:44:33 +01:00
Daniel Stenberg
7e48a34bf8 badwords.pl: don't mention the whitelisted finds
They obscure the real finds

Closes #20158
2026-01-02 11:21:31 +01:00
Viktor Szakats
438ba94461 vtls: drop unused use_alpn from ssl_connect_data struct
Closes #20154
2026-01-02 10:45:12 +01:00
Viktor Szakats
d3bf8d391f src: drop redundant definition of BIT()
It's defined in `lib/curl_setup_once.h` which is always included before
the duplicate definition in `src/tool_cfgable.h`. Delete the latter.

Follow-up to 06bb158737 #16211

Closes #20152
2026-01-02 10:45:12 +01:00
Viktor Szakats
74c4bdc244 ws: replace a cast by matching the format string
Closes #20151
2026-01-02 10:45:12 +01:00
Joshua Vandaële
27ffb81a58 cmake: set found status to OFF when not found (for compression deps)
This fixes curl using libraries if `CURL_{BROTLI|ZLIB|ZSTD}` is set to
`OFF` but the library was found in a parent project that includes curl.

Closes #20147
2026-01-02 01:29:47 +01:00
Viktor Szakats
8292820b73 pytest: replace allowlist with feature check to enable OCSP test 17_08
Add a `cert-status` feature flag to `curlinfo`, based on the conditions
used in `lib/vtls` sources.

To:
- fix disabling this test when using OpenSSL (or fork) built with
  the `no-ocsp` option.
- enable this test for AWS-LC in CI.

Note:
- BoringSSL (and quiche) has OSCP disabled by default.
- MultiSSL dynamic selection continues to confuse this test.
  (To fix it, support would need to be detected by querying libcurl
  via curl. Probably overkill given that OCSP is on its way out.)

Follow-up to f2c765028f #20149

Closes #20133
2026-01-02 01:23:27 +01:00
Viktor Szakats
f2c765028f pytest: enable OCSP test 17_08 for LibreSSL
Before: 735 passed, 115 skipped
After: 738 passed, 112 skipped

Closes #20149
2026-01-01 23:46:05 +01:00
Daniel Stenberg
84e43eefc8 mqtt: return error when a too large packet is decoded
Closes #20148
2026-01-01 23:30:10 +01:00
Viktor Szakats
26c437b1bb GHA/non-native: stop building examples in a cross-job
To make the longest running FreeBSD job finish 1.5 minutes faster
(9.5m -> 8m).

Examples are still built with both autotools and cmake, one on Intel and
one on ARM.

Closes #20146
2026-01-01 23:07:03 +01:00
dependabot[bot]
ef97f47635 GHA: bump pip-dependencies
- update `ruff` from 0.14.9 to 0.14.10
- update `psutil` from 7.1.3 to 7.2.0

Closes #20141
2026-01-01 20:49:00 +01:00
dependabot[bot]
34683b552c GHA: bump gha-dependencies
- update `github/codeql-action` from 4.31.8 to 4.31.9
- update `cross-platform-actions/action` from 0.30.0 to 0.32.0
  - support for OmniOS and FreeBSD 15.0
  - releases are now immutable

Closes #20140
2026-01-01 20:48:59 +01:00
Daniel Stenberg
f7d8725a55 inet_ntop: avoid the strlen()
Also, skip adding the terminating null that is not used.

Closes #20139
2026-01-01 18:06:39 +01:00
Daniel Stenberg
d3eddf4761 source: misc typos
Found by typos-cli

Closes #20138
2026-01-01 12:43:59 +01:00
Daniel Stenberg
23b080401a tool_getparam: simplify the --rate parser
Avoids a memcpy()

Closes #20119
2026-01-01 12:34:54 +01:00
Stuart Henderson
c257831471 CHANGES: fix typo in filename
Closes #20137
2026-01-01 12:20:10 +01:00
Daniel Stenberg
c7b26b6679 tool_paramhlp: simplify number parsing
Closes #20134
2026-01-01 12:15:34 +01:00
Viktor Szakats
1ca678472f tests: drop redundant parenthesis from two macro expressions
Closes #20136
2025-12-31 18:49:53 +01:00
Viktor Szakats
e4f4eeb0c5 libssh: fix indent
Closes #20135
2025-12-31 18:49:53 +01:00
Daniel Stenberg
0c278cd586 tool_paramhlp: remove a malloc+free from proto2num()
Closes #20120
2025-12-31 17:59:30 +01:00
Daniel Stenberg
bfa5857c44 test1664: extend with more tests for curlx_str_quotedword
Closes #20123
2025-12-31 17:06:09 +01:00
Viktor Szakats
258521e170 hostip.h: drop redundant setjmp.h include
Already included directly via `hostip.c`, and other header users do not
use it.

Also add comment about why `setjmp.h` is used.

Cherry-picked from #20106

Closes #20132
2025-12-31 17:00:57 +01:00
Viktor Szakats
352f3f140c tests: include headers only when used
Cherry-picked from #20106

Closes #20131
2025-12-31 17:00:56 +01:00
Viktor Szakats
7ad830bb58 openssl: stop checking for OPENSSL_NO_SHA* macros
Macros have been deleted upstream and never defined in OpenSSL 1.1.0+:
474e469bbd

BoringSSL deleted the last internals uses in 2014:
457112e197

LibreSSL refers to them internally and in two public headers, but never
set them via `openssl/opensslfeatures.h` / `openssl/opensslconf.h`.

Follow-up to 69c89bf3d3 #18330

Closes #20130
2025-12-31 17:00:03 +01:00
Viktor Szakats
0d0ac29cdd openssl: stop checking for OPENSSL_NO_TLSEXT macro
The macro has been deleted upstream and never defined in OpenSSL 1.1.0+:
e481f9b90b

BoringSSL and LibreSSL deleted the last uses in 2014:
6dbd73db5d
7b2f3298f7

Also:
- drop internal guard `HAS_ALPN_OPENSSL`. It's always set.

Follow-up to 69c89bf3d3 #18330

Closes #20129
2025-12-31 16:55:52 +01:00
Viktor Szakats
c7b25e6e82 lib: drop unused or duplicate curlx/timeval.h includes
Note: This patch doesn't aim to add `timeval.h` includes missing from
local headers using `curltime` type. They remain relying on `urldata.h`
being included first. This patch also doesn't delete existing, used
includes already present in local headers (as internal users may rely
on them).

Ref: #20106
Closes #20126
2025-12-31 15:59:19 +01:00
Viktor Szakats
def95e3bbc openssl: fix building against no-ocsp openssl with Apple SecTrust
(Not tested in CI. Regression in 8.17.0.)

Fixing:
```
lib/vtls/openssl.c:4750:8: error: variable 'sectrust_verified' set but not used [-Werror,-Wunused-but-set-variable]
 4750 |   bool sectrust_verified = FALSE;
      |        ^
1 error generated.
```

Follow-up to b4630ed8fa #19308

Closes #20128
2025-12-31 15:51:02 +01:00
Viktor Szakats
be675eeb6d openssl: fix building against no-dsa openssl
(Not tested in CI. Regression within this release cycle.)

Fixing:
```
lib/vtls/openssl.c:304:48: error: unused parameter 'data' [-Werror,-Wunused-parameter]
  304 | static CURLcode get_pkey_dsa(struct Curl_easy *data,
      |                                                ^
lib/vtls/openssl.c:305:40: error: unused parameter 'pubkey' [-Werror,-Wunused-parameter]
  305 |                              EVP_PKEY *pubkey, BIO *mem, int i)
      |                                        ^
lib/vtls/openssl.c:305:53: error: unused parameter 'mem' [-Werror,-Wunused-parameter]
  305 |                              EVP_PKEY *pubkey, BIO *mem, int i)
      |                                                     ^
lib/vtls/openssl.c:305:62: error: unused parameter 'i' [-Werror,-Wunused-parameter]
  305 |                              EVP_PKEY *pubkey, BIO *mem, int i)
      |                                                              ^
```

Follow-up to 833efb437d #19471

Closes #20127
2025-12-31 15:51:01 +01:00
renovate[bot]
ba7e729ffd Dockerfile: update debian:bookworm-slim Docker digest to d5d3f9c
Closes #20115
2025-12-31 12:22:53 +01:00
Yedaya Katsman
660600c747 badwords: add fist -> first, fix fallouts
There are still `curl_fistrgs` in packages/OS400/curl.inc.in but
I'm not sure what that's supposed to be exactly.

Closes #20066
2025-12-31 12:21:42 +01:00
Viktor Szakats
8c02407bef tool_doswin: add debug envs to test filename sanitization failure modes
- `CURL_FN_SANITIZE_BAD=<any-value>` to simulate
  `SANITIZE_ERR_INVALID_PATH`.

- `CURL_FN_SANITIZE_OOM=<any-value>` to simulate
  `SANITIZE_ERR_OUT_OF_MEMORY`.

Both are Windows/MS-DOS-specific and require debug-enabled curl build.

Cherry-picked from #20116
Closes #20125
2025-12-31 12:16:11 +01:00
Daniel Stenberg
37d871af01 tool_getparam: use memdup0() instead of malloc + copy
Closes #20118
2025-12-30 23:53:24 +01:00
trxvorr
f81e7197c1 digest: fix OWS and escaped quote handling
The migration to the strparse API introduced regressions in Digest
authentication parsing where Optional Whitespace (OWS) after commas was
not skipped, and escaped quotes in values were not correctly parsed.

This change ensures whitespace is skipped before key lookups and escaped
characters are properly handled and unescaped in quoted values.

Reported-by: herdiyanitdev on hackerone
Closes #20102
2025-12-30 23:22:26 +01:00
Viktor Szakats
5f5e000278 RELEASE-NOTES: codespell 2025-12-30 17:35:00 +01:00
Daniel Stenberg
d6be42eafa delta: fix grep patterns after white space edits
To make the command line option counter work again

Follow-up to 308c347c8b
2025-12-30 14:04:10 +01:00
Daniel Stenberg
8870fd2b87 RELEASE-NOTES: synced 2025-12-30 14:02:03 +01:00
Viktor Szakats
65993d9c5f libcurl-errors: delete stray double quote
Closes #20117
2025-12-30 12:01:05 +01:00
Jay Satiro
1068d048ec tool_doswin: increase allowable length of path sanitizer
- Use 32767-1 instead of PATH_MAX-1 (260-1) as the maximum allowable
  length of a path in Windows.

Prior to this change the path sanitizer in Windows used 32767-1 as the
maximum length only for paths that had the "\\" prefix like
"\\?\longpath". Since then we added some workarounds to open longer
paths without "\\?\" prefix by normalizing the path and adding that
prefix, and the sanitizer is called before the prefix is added.

Bug: https://github.com/curl/curl/issues/20044
Reported-by: Viktor Szakats

Closes https://github.com/curl/curl/pull/20046
2025-12-30 04:00:50 -05:00
Stefan Eissing
52ac8104e1 ratelimit blocking: fix busy loop
Fix the pollset in perform state to not add sockets for directions
that are blocked. This otherwise will lead to busy loops for a
transfer that cannot be progressed.

Reported-by: Fizn-Ahmd on github
Fixes #20091
Closes #20109
2025-12-29 22:44:34 +01:00
Harry Sintonen
16d5f2a566 libssh: require private key or user-agent for public key auth
Closes #20110
2025-12-29 17:28:22 +01:00
Daniel Stenberg
bc9ab557df telnet: abort on bad suboption sequence
Instead of trying to repair.

Reported-by: Huseyin Tintas

Closes #20108
2025-12-29 10:49:30 +01:00
Daniel Stenberg
7fc78c2c1c urlapi: set uncondtional return code
Curl_parse_login_details() can only return a single return code so
adjust accordingly.

Pointed out by CodeSonar

Closes #20107
2025-12-29 10:17:49 +01:00