]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
8 weeks agolibcurl-security.md: mention long-running connections 18533/head
Dan Fandrich [Fri, 12 Sep 2025 07:10:20 +0000 (00:10 -0700)] 
libcurl-security.md: mention long-running connections

Some applications may want to periodically recheck the remote server
certificate, which doesn't happen on a long-running connection.

Ref: #18527
Closes #18533

8 weeks agodocs/libcurl: remove ancient version references
Daniel Stenberg [Thu, 11 Sep 2025 21:16:55 +0000 (23:16 +0200)] 
docs/libcurl: remove ancient version references

To make the texts easier on the eye.

- Remove most free text references to curl versions before 7.60.0 (May
  2018)
- Leave those present in a HISTORY section

Most of them are already documented in symbols-in-versions anyway.

Closes #18530

8 weeks agoCURLINFO_FTP_ENTRY_PATH.md: this is for SFTP as well
Daniel Stenberg [Thu, 11 Sep 2025 21:46:34 +0000 (23:46 +0200)] 
CURLINFO_FTP_ENTRY_PATH.md: this is for SFTP as well

Closes #18531

8 weeks agourldata: FILE is not a list-only protocol
Daniel Stenberg [Thu, 11 Sep 2025 14:52:40 +0000 (16:52 +0200)] 
urldata: FILE is not a list-only protocol

The struct field thus does not depend on the presence of it

Closes #18525

8 weeks agoCURLOPT_MAXLIFETIME_CONN: make default 24 hours
Daniel Stenberg [Thu, 11 Sep 2025 15:50:59 +0000 (17:50 +0200)] 
CURLOPT_MAXLIFETIME_CONN: make default 24 hours

Set a default value to only reuse existing connections if less than 24
hours old. This makes the TLS certificate check get redone for the new
connection. An application can still set it to zero.

Closes #18527

8 weeks agoGHA/http3-linux: fix nghttpx build and other tweaks
Viktor Szakats [Thu, 11 Sep 2025 13:05:28 +0000 (15:05 +0200)] 
GHA/http3-linux: fix nghttpx build and other tweaks

- fix `nghttp2` build to also build the `nghttpx` application.
  Restore required `libc-ares-dev`. Also confirm that `libev-dev` is
  required too. Document these requirements.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

- explicitly enable `nghttpx` for the `nghttp2` build to make it fail if
  requirements aren't met:
  ```
  configure: error: applications were requested (--enable-app) but dependencies are not met.
  ```

- explicitly install brotli, zstd, zlib for the dependency builds.
  Of these, zstd and zlib are preinstalled. zlib is required for
  `nghttpx`. zstd and brotli doesn't seem to be used, but keep them
  there just in case and to match the test env.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

- enable brotli for `nghttpx`. It doesn't change the tests, and also
  cost almost nothing, so I figure why not.

Closes #18522

8 weeks agossl-sessions.md: mark option experimental
Daniel Stenberg [Thu, 11 Sep 2025 14:09:45 +0000 (16:09 +0200)] 
ssl-sessions.md: mark option experimental

Also make managen output the experimental text with the correct
prefix/margin for the ascii version.

Closes #18523

8 weeks agongtcp2: check error code on connect failure
Stefan Eissing [Thu, 11 Sep 2025 12:12:04 +0000 (14:12 +0200)] 
ngtcp2: check error code on connect failure

Access the error codes of ngtcp2 when a connect attempt failes. Trace
the information for analysis. Treat errors as permanent failure by
default, trigger retrying only when the server refused without
indicating an error.

Closes #18521

8 weeks agoquic: fix min TLS version handling
Stefan Eissing [Thu, 11 Sep 2025 10:59:22 +0000 (12:59 +0200)] 
quic: fix min TLS version handling

When switching to TSLv1.2 as default in
9d8998c99408e1adf8eba629fad9f87b3235bdfa, this led to an explicit
setting of 1.2 on QUIC connections when using quictls, overriding the
already set min version of 1.3.

This leads to a ClientHello with TLS 1.2+1.3 offered on a QUIC connect
which is rejected by the Caddy server. Using ngtcp2 with OpenSSL 3.5+,
GnuTLS or AWS-LC is not affected.

Fixes #18518
Reported-by: fds242 on github
Closes #18520

8 weeks agoGHA/windows: drop repeated word from comment
Viktor Szakats [Thu, 11 Sep 2025 13:02:57 +0000 (15:02 +0200)] 
GHA/windows: drop repeated word from comment

8 weeks agoGHA: fix and tweak installed packages for http3-linux and Windows-cross
Viktor Szakats [Thu, 11 Sep 2025 09:20:08 +0000 (11:20 +0200)] 
GHA: fix and tweak installed packages for http3-linux and Windows-cross

- explicitly install `libldap-dev` to not rely on test-specific packages
  installing it implicitly, to have the same `curl -V` output for each
  TLS backend build pair.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

- install `libev-dev` for tests. It's a runtime dependency for
  the local build of `nghttpx`. Missing it made pytest skip 178 tests.
  Also skewing the 'Gain' time. I estimate it to account for 3 minutes,
  making the total gain ~20 minutes.
  Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509
  (It may be a better solution to disable libev for the local nghttp2
  build, to avoid this hidden dependency.)

- fix quiche jobs to use the local build of `libnghttp2`.

- stop installing the `clang` package for Windows-cross. `clang` and
  `clang-tidy` tools are preinstalled on the Ubuntu 24.04 runner.

Closes #18519

8 weeks agoGHA: update github/codeql-action digest to 192325c
renovate[bot] [Wed, 10 Sep 2025 18:40:05 +0000 (18:40 +0000)] 
GHA: update github/codeql-action digest to 192325c

Closes #18516

8 weeks agoGHA: update rojopolis/spellcheck-github-actions digest to 739a1e3
renovate[bot] [Wed, 10 Sep 2025 16:54:27 +0000 (16:54 +0000)] 
GHA: update rojopolis/spellcheck-github-actions digest to 739a1e3

Closes #18515

8 weeks agoGHA: minimize installed packages in http3-linux and Windows cross-builds
Viktor Szakats [Wed, 10 Sep 2025 08:25:17 +0000 (10:25 +0200)] 
GHA: minimize installed packages in http3-linux and Windows cross-builds

In the last couple of months some jobs started taking a lot of time and
often timing out due to slow `apt install` from the Azure Ubuntu mirror.

The jobs affected were those that installed large packages:
GHA/http3-linux and the 3 cross-build jobs in GHA/windows.

This patch reduces the installed packaged to the minimum required
to complete the jobs. Saving a minute+ for each http3-linux job (a total
of 20+ minutes for the workflow.) Also saving bandwidth and reducing
the chance for long downloads or timeouts with slow Azure repos.

Details:
- http3: delete redundant packages from the `build-cache` job.
- http3: install gnutls dependencies for gnutls jobs only.
- http3: do not install test dependencies in jobs not running tests.
- http3: drop redundant packages from the curl jobs.
- Windows-cross: replace `mingw-w64` with `gcc-mingw-w64-x86-64-win32`
  for the 3 Windows cross-build job. Dropping C++, 32-bit, and 64-bit
  POSIX-threaded parts. Saving time and significant bandwidth for each
  of the 3 jobs:
  Download size: 277 MB -> 65 MB (installed: 1300 MB -> 400 MB)
- Windows-cross: restore previous job time limit of 15m (from 45m)
  Follow-up to ff5140a25f42fef80325c6e28c4802fdb7e06386 #18163

Before:
https://github.com/curl/curl/actions/runs/17611514207 (http3)
https://github.com/curl/curl/actions/runs/17611514185/job/50034354923 (Windows cross)

After:
https://github.com/curl/curl/actions/runs/17628406362?pr=18509 (http3)
https://github.com/curl/curl/actions/runs/17627562551/job/50088055529?pr=18509 (Windows cross)

http3 job           |    Bef. |    Aft. |
:------------------ | ------: | ------: |
Build caches (hot)  |     10s |     12s |
AM awslc            |  3m  0s |  1m 54s |
CM awslc            |  4m 32s |  3m  4s |
AM boringssl        |  3m  9s |  1m 48s |
CM boringssl        |  3m 43s |  3m  2s |
AM gnutls           |  3m  9s |  2m 18s |
CM gnutls           |  4m 19s |  2m 55s |
AM libressl         |  2m 14s |  1m 24s |
CM libressl         |  5m 30s |  2m 57s |
AM openssl          |  5m 16s |  4m 17s |
CM openssl          |  1m 50s |  1m 47s |
AM openssl-quic     |  2m 58s |  1m  7s |
CM openssl-quic     |  4m 16s |  2m 43s |
AM quiche           |  2m 54s |  1m 34s |
CM quiche           |  5m  0s |  3m 15s |
AM quictls          |  2m 34s |  1m 13s |
CM quictls          |  4m 20s |  3m 17s |
AM wolfssl          |  2m 48s |  1m 30s |
CM wolfssl          |  4m 49s |  3m 22s |
Total:              | 66m 21s | 43m 27s |
Gain:               |         | 22m 54s |

Out of curiousity, build times as seen in the http3 build-cache job:
- TLS backends:
  - openssl: 2m25s
  - libressl: 27s
  - aws-lc: 41s
  - boringssl: 1m8s
  - quictls: 1m46s
  - gnutls: 6m30s
  - wolfssl: 51s
  - quiche + boringssl: 1m9s
- ng* libs (not yet optimized for build speed):
  - nghttp3: 13s
  - ngtcp2: 52s (with 6 backends, 3 runs)
  - ngtcp2: 19s (boringssl)
  - nghttp2: 21s
Ref: https://github.com/curl/curl/actions/runs/17626120054/job/50083344805

A similar effort in curl-for-win, affecting 2 GHA/curl-for-win Windows
jobs (though they use the default Debian repo, with no issues):
- with llvm/clang:
  Download size: 648 MB -> 430 MB (installed: 3344 MB -> 2333 MB)
- with gcc:
  Download size: 550 MB -> 328 MB (installed: 2815 MB -> 1804 MB)
Ref: https://github.com/curl/curl-for-win/commit/e19665d9486bdca60f996ed2e198a66128cfba38
Ref: https://github.com/curl/curl-for-win/commit/6b14c3946a8c89dc1d3847afc9501fc71f3ac628

Bug: https://github.com/curl/curl/pull/18502#issuecomment-3270259744

Closes #18509

8 weeks agocurl_mem_undef.h: limit to `CURLDEBUG` for non-memalloc overrides
Viktor Szakats [Wed, 10 Sep 2025 10:48:06 +0000 (12:48 +0200)] 
curl_mem_undef.h: limit to `CURLDEBUG` for non-memalloc overrides

To fix non-`CURLDEBUG` builds on 32-bit AIX, where `fopen` is a system
macro.

Ref: #18502
Ref: https://github.com/curl/curl/pull/18502/commits/793a375ce3002454599ffe2d7b561b6340103306

Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827
Reported-by: Andrew Kirillov
Fixes #18510
Closes #18514

8 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 10 Sep 2025 10:54:59 +0000 (12:54 +0200)] 
RELEASE-NOTES: synced

and bump include/curl/curlver.h

8 weeks agocurl_easy_getinfo: error code on NULL arg
Stefan Eissing [Wed, 10 Sep 2025 09:55:24 +0000 (11:55 +0200)] 
curl_easy_getinfo: error code on NULL arg

When passing an address to curl_easy_getinfo to retrieve a value and the
address is NULL, return CURLE_BAD_FUNCTION_ARGUMENT instead of
CURLE_UNKNOWN_OPTION.

Closes #18512

8 weeks agoeasy_getinfo: check magic, Curl_close safety
Stefan Eissing [Wed, 10 Sep 2025 09:33:36 +0000 (11:33 +0200)] 
easy_getinfo: check magic, Curl_close safety

Check the easy handles magic in calls to curl_easy_getinfo().
In Curl_close() clear the magic after DNS shutdown since we'd
like to see tracing for this.
When clearing the magic, also clear the verbose flag so we
no longer call DEBUGFUNCTION on such a handle.

Closes #18511

8 weeks agoquic: ignore EMSGSIZE on receive
Ethan Everett [Mon, 8 Sep 2025 23:50:58 +0000 (16:50 -0700)] 
quic: ignore EMSGSIZE on receive

Some OSes (Linux, macOS, more?) will generate an EMSGSIZE socket error
on the next recv all after receiving an ICMP Packet Too Big on an
unconnected UDP socket.

These can be safely ignored as QUIC's DPLPMTUD uses MTU probes that do
not rely on receiving ICMP packets.

Closes #18505

8 weeks agoRELEASE-NOTES: synced curl-8_16_0
Daniel Stenberg [Wed, 10 Sep 2025 05:41:00 +0000 (07:41 +0200)] 
RELEASE-NOTES: synced

curl 8.16.0 release

8 weeks agoVERSIONS: update past versions
Daniel Stenberg [Wed, 10 Sep 2025 05:42:50 +0000 (07:42 +0200)] 
VERSIONS: update past versions

8 weeks agoTHANKS: names from the 8.16.0 cycle
Daniel Stenberg [Wed, 10 Sep 2025 05:41:00 +0000 (07:41 +0200)] 
THANKS: names from the 8.16.0 cycle

8 weeks agopytest: bind to localhost
Viktor Szakats [Tue, 9 Sep 2025 20:40:02 +0000 (22:40 +0200)] 
pytest: bind to localhost

Pointed out by CodeQL

Fixes https://github.com/curl/curl/security/code-scanning/298

Closes #18506

8 weeks agoGHA: update github/codeql-action digest to d3678e2
renovate[bot] [Tue, 9 Sep 2025 21:31:54 +0000 (21:31 +0000)] 
GHA: update github/codeql-action digest to d3678e2

Closes #18507

8 weeks agoGHA/codeql: scan GHA workflows and Python
Viktor Szakats [Tue, 9 Sep 2025 14:57:19 +0000 (16:57 +0200)] 
GHA/codeql: scan GHA workflows and Python

Closes #18504

8 weeks agoDockerfile: update debian:bookworm-slim Docker digest to df52e55
renovate[bot] [Mon, 8 Sep 2025 22:24:36 +0000 (22:24 +0000)] 
Dockerfile: update debian:bookworm-slim Docker digest to df52e55

Closes #18499

8 weeks agolib: introduce `CURL_ACCEPT()`
Viktor Szakats [Tue, 9 Sep 2025 08:00:13 +0000 (10:00 +0200)] 
lib: introduce `CURL_ACCEPT()`

To avoid overriding the system symbol `accept`, which is a macro on some
systems (AIX), and thus can't be called via the `(function)` PP trick.

It's also problematic to reset such macro to its original value.

Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827
Reported-by: Andrew Kirillov
Fixes #18500
Closes #18501
Closes #18502

8 weeks ago_ENVIRONMENT.md: document NETRC
Daniel Stenberg [Mon, 8 Sep 2025 15:10:18 +0000 (17:10 +0200)] 
_ENVIRONMENT.md: document NETRC

Follow-up to 378713deb2cf5137c7cffe6227d9d5

Closes #18497

8 weeks agodocs: put `<>` within backticks in titles
Daniel Stenberg [Mon, 8 Sep 2025 15:29:56 +0000 (17:29 +0200)] 
docs: put `<>` within backticks in titles

To render better markdown. Make managen warn if present "unticked" and
unescaped.

Closes #18498

8 weeks agovquic: replace assert
Stefan Eissing [Mon, 8 Sep 2025 13:29:29 +0000 (15:29 +0200)] 
vquic: replace assert

Replace the hard assert in case not all data is send on UDP
(which should never happen), with an error return.

Closes #18495

8 weeks agows: get a new mask for each new outgoing frame
Daniel Stenberg [Mon, 8 Sep 2025 12:14:15 +0000 (14:14 +0200)] 
ws: get a new mask for each new outgoing frame

Reported-by: Calvin Ruocco
Closes #18496

8 weeks agocurl_setup.h: include `limits.h` before testing for `#ifndef SSIZE_MAX`
Andrew [Mon, 8 Sep 2025 12:07:29 +0000 (13:07 +0100)] 
curl_setup.h: include `limits.h` before testing for `#ifndef SSIZE_MAX`

Ref: 93f333c18fffc3c091b149f3e0ec2ca02b8dab40 #18426 #18406
Fixes #18493
Closes #18494

8 weeks agoKNOWN_BUGS: OpenSSL-QUIC problems on google.com
Daniel Stenberg [Mon, 8 Sep 2025 08:20:29 +0000 (10:20 +0200)] 
KNOWN_BUGS: OpenSSL-QUIC problems on google.com

Closes #18336
Closes #18492

8 weeks agoRELEASE-PROCEDURE.md: drop the _newslog edit mention
Daniel Stenberg [Mon, 8 Sep 2025 09:12:47 +0000 (11:12 +0200)] 
RELEASE-PROCEDURE.md: drop the _newslog edit mention

Because that file has now been removed from the website repository

8 weeks agoRELEASE-PROCEDURE.md: remove some old release dates, add some new
Daniel Stenberg [Mon, 8 Sep 2025 08:14:12 +0000 (10:14 +0200)] 
RELEASE-PROCEDURE.md: remove some old release dates, add some new

8 weeks agomailmap: unify on James
Daniel Stenberg [Mon, 8 Sep 2025 07:26:22 +0000 (09:26 +0200)] 
mailmap: unify on James

2 months agoGHA/linux: run on `.md` file changes
Viktor Szakats [Sun, 7 Sep 2025 12:16:39 +0000 (14:16 +0200)] 
GHA/linux: run on `.md` file changes

To execute runtests on Markdown files. E.g. test 1275.

Bug: https://github.com/curl/curl/pull/18486#issuecomment-3263681032

Closes #18487

2 months agolib: fix broken link in comment
Viktor Szakats [Sun, 7 Sep 2025 17:19:05 +0000 (19:19 +0200)] 
lib: fix broken link in comment

2 months agoBINDINGS: point a link to archive.org
Viktor Szakats [Sun, 7 Sep 2025 16:49:26 +0000 (18:49 +0200)] 
BINDINGS: point a link to archive.org

The original website is hosting different content now.

Closes #18489

2 months agoVULN-DISCLOSURE-POLICY: make it pass test 1275
Viktor Szakats [Sun, 7 Sep 2025 10:32:54 +0000 (12:32 +0200)] 
VULN-DISCLOSURE-POLICY: make it pass test 1275

```
test 1275...[Verify capital letters after period in markdown files]
 ../../docs/VULN-DISCLOSURE-POLICY.md:426:55:error: lowercase daily after period
 * regular communication from communication leader (ex. daily update)
```
Ref: https://github.com/curl/curl/actions/runs/17527331816/job/49779555753?pr=18485

Also: add ending slashes to 2 URLs.

Follow-up to 6905370df5fcf2b0d0fc443448d17fc98113b067 #18483
Closes #18486

2 months agoopenldap: fix `-Wtentative-definition-compat`
Viktor Szakats [Thu, 4 Sep 2025 09:58:02 +0000 (11:58 +0200)] 
openldap: fix `-Wtentative-definition-compat`

It's a `-Weverything` warning that appeared in llvm/clang 21.

```
lib/openldap.c:1297:19: warning: duplicate declaration of 'ldapsb_tls' is invalid in C++ [-Wtentative-definition-compat]
 1297 | static Sockbuf_IO ldapsb_tls =
      |                   ^
lib/openldap.c:499:19: note: previous declaration is here
  499 | static Sockbuf_IO ldapsb_tls;
      |                   ^
```

Reported-by: correctmost on github
Fixes #18470
Cherry-picked from #18477
Closes #18485

2 months agodocs: add major incident section to vuln disclosure policy
Jim Fuller [Fri, 5 Sep 2025 10:38:55 +0000 (12:38 +0200)] 
docs: add major incident section to vuln disclosure policy

Closes #18483

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 6 Sep 2025 10:12:55 +0000 (12:12 +0200)] 
RELEASE-NOTES: synced

2 months agowebsocket: handling of PONG frames
Stefan Eissing [Thu, 4 Sep 2025 14:09:05 +0000 (16:09 +0200)] 
websocket: handling of PONG frames

The auto PONG frames were inserted into the connection at the time
a PING had been decoded, irregardless if an upstream frame was just
in the middle of being assembled.

Add PONG frames only to the buffer if there is no frame currently
assemebled and, if it is, set the control frame aside. This control
frame is then added on the first opportunity of a "clean" send buffer.

There is only a single control frame set aside at a time. This means
a double PING will, when the PONG cannot be sent right away, only
send the last PONG.

I imagine this is fine. We want to prevent the endless buffering of
PONG frames on a connection where the server sends but does no receives.

Reported-by: Calvin Ruocco
Fixes #16706
Closes #18479

2 months agogha: Update actions/labeler action to v6
renovate[bot] [Thu, 4 Sep 2025 18:38:47 +0000 (18:38 +0000)] 
gha: Update actions/labeler action to v6

2 months agospacecheck: warn for 3+ empty lines in a row, fix fallouts
Viktor Szakats [Thu, 4 Sep 2025 13:25:27 +0000 (15:25 +0200)] 
spacecheck: warn for 3+ empty lines in a row, fix fallouts

Closes #18478

2 months agowebsocket: reset upload_done when sending data
Stefan Eissing [Thu, 4 Sep 2025 10:00:48 +0000 (12:00 +0200)] 
websocket: reset upload_done when sending data

Sending websocket data did not clear the "upload_done" flag of
the initial HTTP Upgrade request, leading to KEEP_SEND never be
cleared. This caused the socket to be polled for INOUT after all
the websocket data had been sent. A busy loop.

Closes #18476

2 months agotop-complexity: set threshold to 70
Daniel Stenberg [Thu, 4 Sep 2025 06:32:58 +0000 (08:32 +0200)] 
top-complexity: set threshold to 70

Closes #18475

2 months agortsp: split out a subfunction from rtsp_do
Daniel Stenberg [Wed, 3 Sep 2025 22:03:04 +0000 (00:03 +0200)] 
rtsp: split out a subfunction from rtsp_do

Takes complexity down from 71 to 52.

Closes #18471

2 months agohttp_add_connection_hd: respect previous error
Daniel Stenberg [Wed, 3 Sep 2025 22:46:08 +0000 (00:46 +0200)] 
http_add_connection_hd: respect previous error

Pointed out by CodeSonar

Closes #18472

2 months agocmake: fix setting LTO properties on the wrong targets
Viktor Szakats [Wed, 3 Sep 2025 16:09:29 +0000 (18:09 +0200)] 
cmake: fix setting LTO properties on the wrong targets

Follow-up to ae1a861bd62339b34cfd433e5941904e7d6878a1 #17043

Closes #18469

2 months agolib: drop `UNUSED_PARAM` macro
Viktor Szakats [Tue, 2 Sep 2025 13:40:12 +0000 (15:40 +0200)] 
lib: drop `UNUSED_PARAM` macro

Added in 2011, but has seen little use in the code. The necessary
compiler feature is missing in some compilers (e.g. MSVC), thus in most
places the portable `(void)` cast is used in addition.

Also:
- vtls/rustls: silence unused argument warning with `(void)`.
  Necessary for MSVC, for example.

Ref: ee4ed461288ec74641e3b96d5508628c07f689b0

Closes #18455

2 months agotidy-up: drop stray "unused" comments
Viktor Szakats [Tue, 2 Sep 2025 11:20:20 +0000 (13:20 +0200)] 
tidy-up: drop stray "unused" comments

Closes #18453

2 months agomulti: limit-rate revisited
Stefan Eissing [Tue, 2 Sep 2025 13:16:21 +0000 (15:16 +0200)] 
multi: limit-rate revisited

Tweaks around handling of --limit-rate:

* tracing: trace outstanding timeouts by name
* multi: do not mark transfer as dirty that have
  an EXPIRE_TOOFAST set
* multi: have one static function to asses speed limits
* multi: when setting EXPIRE_TOOFAST remove the transfers
  from the dirty set
* progress: rename vars and comment on how speed limit
  timeouts are calculated, for clarity
* transfer: when speed limiting, exit the receive loop
  after a quarter of the limit has been received, not
  on the first chunk received.
* cf-ip-happy.c: clear EXPIRE_HAPPY_EYEBALLS on connect
* scorecard: add --limit-rate parameter to test with
  speed limits in effect

Closes #18454

2 months agoGHA: update nghttp2/nghttp2 to v1.67.0
renovate[bot] [Tue, 2 Sep 2025 14:37:37 +0000 (14:37 +0000)] 
GHA: update nghttp2/nghttp2 to v1.67.0

Closes #18456

2 months agotest763: verify IDN hostname with zero width characters only
Daniel Stenberg [Wed, 3 Sep 2025 10:47:07 +0000 (12:47 +0200)] 
test763: verify IDN hostname with zero width characters only

Bonus: fix memory leak in exit path from 967a626af48aafd37

Closes #18465

2 months agotests: remove the 'none' server
Daniel Stenberg [Wed, 3 Sep 2025 11:21:26 +0000 (13:21 +0200)] 
tests: remove the 'none' server

Only actually needed servers should be listed and none is then implied
if no servers are listed.

Outputs a warning if "none" is still set as a server.

Closes #18466

2 months agohttp: do the cookie list access under lock
David Zhuang [Wed, 3 Sep 2025 00:28:21 +0000 (17:28 -0700)] 
http: do the cookie list access under lock

A previous refactor of cookie logic changed Curl_cookie_getlist to no
longer return a list of copied cookies, but instead return a linked list
pointing to existing cookies. The returned linked list is accessed
outside of the scope of the cookie share lock in http_cookies, which
leads to issues if the shared cookie list is modified at the same time.
This is the relevant commit: be39ed1

Closes #18457

2 months agoGHA: Update cloudflare/quiche to v0.24.6
renovate[bot] [Wed, 3 Sep 2025 09:36:30 +0000 (09:36 +0000)] 
GHA: Update cloudflare/quiche to v0.24.6

Closes #18464

2 months agopytest: add tests for getting a non-existing ftp file
Stefan Eissing [Wed, 3 Sep 2025 09:21:42 +0000 (11:21 +0200)] 
pytest: add tests for getting a non-existing ftp file

Check that return code is 78.

Closes #18463

2 months agoidn: reject conversions that end up as a zero length hostname
Daniel Stenberg [Wed, 3 Sep 2025 07:41:29 +0000 (09:41 +0200)] 
idn: reject conversions that end up as a zero length hostname

Reported-by: RepoRascal on hackerone
Closes #18462

2 months agoGHA: update awslabs/aws-lc to v1.60.0
renovate[bot] [Wed, 3 Sep 2025 07:37:03 +0000 (07:37 +0000)] 
GHA: update awslabs/aws-lc to v1.60.0

Closes #18458

2 months agotool_getparam: warn on more unicode prefixes
Daniel Stenberg [Wed, 3 Sep 2025 07:52:36 +0000 (09:52 +0200)] 
tool_getparam: warn on more unicode prefixes

If a string argument is expected and the first two bytes are 0xe2 ex80
and the third has the 7th bit set, that's enough for curl to warn.

Previously we tried to detect and warn only for the unicode double
quote, but users might use single quotes, other quotes or even lead the
argument with one of the "zero widths" characters. This is an attempt to
detect many of those. Without triggering for "normal" IDN hostnames.

Closes #18459

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 3 Sep 2025 06:36:25 +0000 (08:36 +0200)] 
RELEASE-NOTES: synced

2 months agoprojects: fix Windows project 'clean' function
Jay Satiro [Wed, 27 Aug 2025 07:35:01 +0000 (03:35 -0400)] 
projects: fix Windows project 'clean' function

- Fix generate.bat "-clean" option.

- Change version template substitutes to match old files, eg go back to
  using format version "11.00" instead of "11.0".

- Limit the vcxproj filters file types that are filtered to c, h, rc.

- Get rid of the tmpl extension from template files and add a README
  to the tmpl directory explaining the purpose of the files.

- gitignore VCxx directories entirely rather than individual file types.

- Do not remove the VC directories during clean, instead remove just the
  generated project files.

Removing the VC directories has the unwanted behavior of removing files
other than those generated. Visual Studio will generate its own
preference files (like if you have some debug arguments in your .suo)
and those files sit in the VC directories. We ignore those files since
they are the user's files and should not be deleted. Also the user may
have their own untracked files that we shouldn't be deleting.

Follow-up to 57d349fe which consolidated the project templates.

Assisted-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/18412

2 months agodocs: fix typo (staring -> starting)
Florian Friedrich [Tue, 2 Sep 2025 07:44:07 +0000 (09:44 +0200)] 
docs: fix typo (staring -> starting)

Closes #18450

2 months ago.editorconfig: add
Michał Petryka [Tue, 26 Aug 2025 22:47:20 +0000 (00:47 +0200)] 
.editorconfig: add

This allows IDEs that support this standard to automatically use the
correct formatting options.

Closes #18409

2 months agoparsedate: make Curl_getdate_capped able to return epoch
Daniel Stenberg [Mon, 1 Sep 2025 14:36:53 +0000 (16:36 +0200)] 
parsedate: make Curl_getdate_capped able to return epoch

By returning error separately on parse errors and avoiding magic
numbers, this function can now return 0 or -1 as proper dates when such
a date string is provided.

Closes #18445

2 months agoCurl_http(), decomplexify
Stefan Eissing [Mon, 1 Sep 2025 13:52:30 +0000 (15:52 +0200)] 
Curl_http(), decomplexify

Split out adding of individual request headers into a switch. Check
the connection http version only on fresh connections, use separate
methods.

Add TE: header directly without allocation. Add bit for indicating
Connection: header has been added and custom headers should not do
that again.

Closes #18444

2 months agoCURLINFO_FILETIME*.md: correct the examples
Daniel Stenberg [Mon, 1 Sep 2025 21:38:44 +0000 (23:38 +0200)] 
CURLINFO_FILETIME*.md: correct the examples

Only -1 means bad value, all others are acceptable.

Ref: #18424
Closes #18447

2 months agotool_filetime: correct the conditions
Daniel Stenberg [Mon, 1 Sep 2025 21:21:58 +0000 (23:21 +0200)] 
tool_filetime: correct the conditions

The libcurl API for CURLINFO_FILETIME_T clearly says it contains -1 if
not set. Everything else is a valid time stamp so use that.

Follow-up to 54f1ef05d672453d75a5fc60
Closes #18446

2 months agoaws-lc: do not use large buffer
Stefan Eissing [Fri, 29 Aug 2025 15:38:45 +0000 (17:38 +0200)] 
aws-lc: do not use large buffer

test_10_08, uploading larger files for a h2 proxy, sporadically fails
with a decrpytion error on received data in AWS-LC. The frequency can
be increased by simulated network receive blocks.

Not setting a 4 * TLS record sized buffer, leaving AWS-LC at its
default buffer size seems to mitigate this problem.

Closes #18434

2 months agoautotools: make curl-config executable
Yedaya Katsman [Fri, 29 Aug 2025 14:09:00 +0000 (17:09 +0300)] 
autotools: make curl-config executable

This was already done when building using CMake:
https://github.com/curl/curl/blob/fa9151b41ad986e0514d99dd3fe149f26a7a57a3/CMakeLists.txt#L2391-L2394

Closes #18433

2 months agocw-out: add assert for data->conn
Daniel Stenberg [Sun, 31 Aug 2025 11:33:05 +0000 (13:33 +0200)] 
cw-out: add assert for data->conn

Instead of checking it runtime. CodeSonar pointed out that if it
actually CAN legitimately be NULL here, then we need to do more checks
for it...

Closes #18440

2 months agotool: move the error buffer to the per transfer struct
Daniel Stenberg [Sun, 31 Aug 2025 14:24:44 +0000 (16:24 +0200)] 
tool: move the error buffer to the per transfer struct

To avoid having to alloc or manage it separately.

Closes #18442

2 months agotool_filetime: accept setting negative filetime
Daniel Stenberg [Sun, 31 Aug 2025 21:21:43 +0000 (23:21 +0200)] 
tool_filetime: accept setting negative filetime

This allows --remote-time to set dates before 1970.

Due to a minor omission in the API, it will still avoid setting the time
if it is indeed exactly epoch 0 (jan 1 1970).

Verified by test 762

Fixes #18424
Reported-by: Terence Eden
Closes #18443

2 months agotest500: accept 81 allocations
Daniel Stenberg [Sun, 31 Aug 2025 20:39:36 +0000 (22:39 +0200)] 
test500: accept 81 allocations

In some configs they happen

Closes #18441

2 months agoGHA/http3-linux: update dependency ngtcp2/ngtcp2 to v1.15.1
renovate[bot] [Sun, 31 Aug 2025 09:29:04 +0000 (09:29 +0000)] 
GHA/http3-linux: update dependency ngtcp2/ngtcp2 to v1.15.1

Closes #18439

2 months agoGHA/windows: update msys2/setup-msys2 digest to fb197b7
renovate[bot] [Sat, 30 Aug 2025 20:29:06 +0000 (20:29 +0000)] 
GHA/windows: update msys2/setup-msys2 digest to fb197b7

https://github.com/msys2/setup-msys2/releases/tag/v2.29.0

Includes perl 5.40.3.

Ref: 5bb49a485c1d34a088e37c18035897364f961559 #18425

Closes #18438

2 months agourlglob: only accept 255 globs
Daniel Stenberg [Fri, 29 Aug 2025 21:25:50 +0000 (23:25 +0200)] 
urlglob: only accept 255 globs

- using {} with single entries makes little sense
- when using {} sets with two entry lists, there can only be 64 to reach
  maximum number of URLs

Verify the max check in test 761

2 months agocurl_setup.h: include `stdint.h` earlier
Viktor Szakats [Fri, 29 Aug 2025 09:02:55 +0000 (11:02 +0200)] 
curl_setup.h: include `stdint.h` earlier

To have it included by the time checking for `SIZE_MAX` and `SSIZE_MAX`.

Ref: 93f333c18fffc3c091b149f3e0ec2ca02b8dab40 #18426 #18406

Closes #18430

2 months agocw-out: handle error codes for 0len writes
Stefan Eissing [Fri, 29 Aug 2025 08:20:12 +0000 (10:20 +0200)] 
cw-out: handle error codes for 0len writes

Handle errors returned by the callback the same for 0-length writes as
for all the others.

Closes #18428

2 months agongtcp2: handshake timeout should be equal to --connect-timeout
XCas13 [Fri, 29 Aug 2025 09:52:25 +0000 (13:52 +0400)] 
ngtcp2: handshake timeout should be equal to --connect-timeout

Default timeout is hardcoded (10 seconds) and doesn't respect
--connect-timeout parameter. In some cases 10 seconds can be not enough
or too long to "establish a connection". Moreover the non-working
--connect-timeout parameter for http3 is confusing. This change makes
the handshake timeout equal to --connect-timeout, if it's set.
Discussion is here https://github.com/curl/curl/discussions/18427

Closes #18431

2 months agoGHA/windows: fix perl 5.40.3 bump fallout with custom-built modules
Viktor Szakats [Thu, 28 Aug 2025 20:36:47 +0000 (22:36 +0200)] 
GHA/windows: fix perl 5.40.3 bump fallout with custom-built modules

Perl got bumped from 5.38.4 to 5.40.3. The new version crashes when
loading the `Win32::Process*` modules built and cached in CI. The build
job uses Perl 5.38.4.

To avoid the crash, include the Perl version (hashed) in the cache key,
so that it's only loaded when the Perl version matches.

This solution is imperfect, because some of the jobs will not use the
Perl modules in transition periods, when different jobs use different
Perl versions. Anyway, can't think of a better one for now. Another
option is to drop the effort with these modules. After all they did not
help with crashes and hangs, nor with performance. While adding quite
a bit of CI complexity.

Also:
- test early if the modules load and log the result.

Follow-up to 52775a7fb4ba63d66d60067dea4a5293fb7c55a1 #18296

Closes #18425

2 months agocurl_setup: use SIZE_MAX instead of SIZE_T_MAX
Daniel Stenberg [Fri, 29 Aug 2025 07:24:39 +0000 (09:24 +0200)] 
curl_setup: use SIZE_MAX instead of SIZE_T_MAX

As SIZE_MAX exists in C99

Assisted-by: Stefan Eissing
Assisted-by: Jay Satiro
Ref: #18406
Closes #18426

2 months agoclang-tidy: disable `clang-analyzer-security.ArrayBound`
Viktor Szakats [Thu, 28 Aug 2025 12:26:43 +0000 (14:26 +0200)] 
clang-tidy: disable `clang-analyzer-security.ArrayBound`

It's causing false-positives with clang-tidy v21, in cases in system
headers (seen in `FD_ISSET()` with macOS SDK). In some cases in
tests/server, there was no distinct source line that was triggering it.

Example:
```
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/include/sys/_types/_fd_def.h:83:10: error: Potential out of bound access to 'fds_read.fds_bits' with tainted index [clang-analyzer-security.ArrayBound,-warnings-as-errors]
   83 |                 return _p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)));
      |                        ^
[...]
/Users/runner/work/curl/curl/tests/server/socksd.c:679:5: note: Taking false branch
  679 |     if(rc < 0) {
      |     ^
```

Closes #18422

2 months agoDEPRECATE.md: drop old OpenSSL versions
Daniel Stenberg [Wed, 27 Aug 2025 06:01:17 +0000 (08:01 +0200)] 
DEPRECATE.md: drop old OpenSSL versions

Closes #18413

2 months agocookie: simplifications
Daniel Stenberg [Thu, 28 Aug 2025 09:42:49 +0000 (11:42 +0200)] 
cookie: simplifications

- add Curl_secure_context(), to have it determined in a single place.

- tweak the Curl_cookie_getlist() proto. Move some logic into the
  function - at is only called in a single place. Instead of forcing the
  caller to do it.

- make 'is_ip' a const

Closes #18419

2 months agorequests: fix uninitialized var
Stefan Eissing [Thu, 28 Aug 2025 10:06:39 +0000 (12:06 +0200)] 
requests: fix uninitialized var

init char whose address is passed for a 0-length buffer, clang does not
like it

Refs #18418
Closes #18420

2 months agowebsocket: improve handling of 0-len frames
Stefan Eissing [Mon, 18 Aug 2025 15:12:35 +0000 (17:12 +0200)] 
websocket: improve handling of 0-len frames

Write out 9-length frames to client's WRITEFUNCTION
Read 0-length frames from READFUNCTION *if* the function
started a new frame via `curl_ws_start_frame()`.

Fixes #18286
Closes #18332
Reported-by: Andriy Druk
2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 28 Aug 2025 07:51:22 +0000 (09:51 +0200)] 
RELEASE-NOTES: synced

2 months agoHTTP3.md: avoid `configure` issue for ngtcp2 1.14.0+ compatibility
Viktor Szakats [Wed, 27 Aug 2025 14:23:58 +0000 (16:23 +0200)] 
HTTP3.md: avoid `configure` issue for ngtcp2 1.14.0+ compatibility

Applied the same workaround to the build examples as used earlier in CI.
That is, drop `<path> from `--with-ngtcp2=<path>` and configure env
`PKG_CONFIG_PATH` instead.

Till the root cause is fixed.

Ref: 99500660af19f89069e71c2251c13963401b3806 #18028

Reported-by: Pavel Kropachev
Fixes #18188
Closes #18415

2 months agoDEPRECATE.md: drop support for c-ares versions before 1.16.0
Daniel Stenberg [Tue, 26 Aug 2025 22:11:38 +0000 (00:11 +0200)] 
DEPRECATE.md: drop support for c-ares versions before 1.16.0

in March 2026

That month, c-ares 1.16.0 celebrates its sixth birthday.

Closes #18408

2 months agoschannel: fix renegotiation
Jay Satiro [Fri, 1 Aug 2025 07:57:12 +0000 (03:57 -0400)] 
schannel: fix renegotiation

- Move the schannel_recv renegotiation code to function
  schannel_recv_renegotiate.

- Save the state of a pending renegotiation.

- Pre-empt schannel_recv and schannel_send to continue a pending
  renegotation.

- Partially block during renegotiation if necessary.

Prior to this change, since a1850ad7 (precedes 8.13.0), schannel_recv
did not properly complete renegotiation before attempting to decrypt
data. In some cases that could cause an error SEC_E_CONTEXT_EXPIRED.
Most of the time though DecryptMessage would succeed by chance and
return SEC_I_RENEGOTIATE which allowed the renegotiation to continue.

Reported-by: stephannn@users.noreply.github.com
Reported-by: Dustin L. Howett
Fixes https://github.com/curl/curl/issues/18029
Closes https://github.com/curl/curl/pull/18125

2 months agoschannel: fix memory leak during handshake
Jay Satiro [Wed, 27 Aug 2025 02:33:38 +0000 (22:33 -0400)] 
schannel: fix memory leak during handshake

Follow-up to b6a5f672 which improved the handshake procedure.

Ref: https://github.com/curl/curl/pull/18323

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

2 months agotests: remove the QUIT filters
Daniel Stenberg [Tue, 26 Aug 2025 14:06:35 +0000 (16:06 +0200)] 
tests: remove the QUIT filters

Once added in cd4aee156f64f44bb1f1 to work around connection shutdown
issues.

Closes #18405

2 months agowolfssl: simplify Curl_wssl_ctx_init
Daniel Stenberg [Tue, 26 Aug 2025 13:15:19 +0000 (15:15 +0200)] 
wolfssl: simplify Curl_wssl_ctx_init

by splitting out functions for client certificate and setting min/max
TLS version

Closes #18402

2 months agoGHA/linux: build `-O3` job with unity batches to save 10-15s
Viktor Szakats [Thu, 14 Aug 2025 21:43:34 +0000 (23:43 +0200)] 
GHA/linux: build `-O3` job with unity batches to save 10-15s

Before (build, test run):
https://github.com/curl/curl/actions/runs/16974205126/job/48118716664 25s, 12m56
https://github.com/curl/curl/actions/runs/16973102133/job/48114977897 24s, 12m51

After, with batch size 50 (build, test run):
https://github.com/curl/curl/actions/runs/17250901063/job/48952645881?pr=18293 16s, 12m51
https://github.com/curl/curl/actions/runs/17250901063/job/48953665204?pr=18293 17s, 12m42

Closes #18293

2 months agoftp: simplify
Daniel Stenberg [Tue, 26 Aug 2025 14:03:24 +0000 (16:03 +0200)] 
ftp: simplify

- Avoid checking what's always true. The ftpcode pointer is always
  passed in, so use it.
- Simplified an indent level somewhat
- Split out two functions from the state machine

Closes #18403

2 months agoruntests: remove warning message
Daniel Stenberg [Tue, 26 Aug 2025 14:05:07 +0000 (16:05 +0200)] 
runtests: remove warning message

Every time we first run runtests with -j and then again *without* -j,
this message was shown:

  "Warning: $runnerid: cleardir(log) failed"

Not anymore.

Closes #18404