]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
7 weeks agosasl: clear canceled mechanism instead of toggling it
Joshua Rogers [Tue, 16 Sep 2025 18:27:23 +0000 (23:27 +0500)] 
sasl: clear canceled mechanism instead of toggling it

Use &= ~authused in SASL_CANCEL (was ^=) to actually remove the offending
mechanism and avoid re-enabling a disabled mech on retry.

Closes #18573

7 weeks agoldap: do not base64 encode zero length string
Daniel Stenberg [Thu, 18 Sep 2025 13:50:17 +0000 (15:50 +0200)] 
ldap: do not base64 encode zero length string

Reported-by: Joshua Rogers
Closes #18602

7 weeks agoGHA/codeql: enable cares, debug, build curlinfo, examples
Viktor Szakats [Tue, 16 Sep 2025 09:47:38 +0000 (11:47 +0200)] 
GHA/codeql: enable cares, debug, build curlinfo, examples

Also build examples, out of curiousity, as an experiment, possibly
temporary. It needs around 40 seconds.

Closes #18564

7 weeks agoopenldap: avoid indexing the result at -1 for blank responses
Daniel Stenberg [Thu, 18 Sep 2025 13:02:03 +0000 (15:02 +0200)] 
openldap: avoid indexing the result at -1 for blank responses

Reported-by: Joshua Rogers
Closes #18600

7 weeks agosmb: adjust buffer size checks
Daniel Stenberg [Thu, 18 Sep 2025 12:49:09 +0000 (14:49 +0200)] 
smb: adjust buffer size checks

The checks did not account for the **two byte** 16bit read so risked
reading one more byte than what actually was received.

Reported-by: Joshua Rogers
Closes #18599

7 weeks agocfilter: unlink and discard
Stefan Eissing [Thu, 18 Sep 2025 09:10:45 +0000 (11:10 +0200)] 
cfilter: unlink and discard

Rewrite the code that removes a filter from the connection and discards
it. Always look at the connection, otherwise it will not work of the
filter is at the top of the chain.

Change QUIC filter setup code to always tear down the chain in
construction when an error occured.

HTTP proxy, do not remove the h1/h2 sub filter on close. Leave it to be
discarded with the connection. Avoids keeping an additional pointer that
might become dangling.

Triggered by a reported on a code bug in discard method.

Reported-by: Joshua Rogers
Closes #18596

7 weeks agotool: fix exponential retry delay
Daniel Stenberg [Thu, 18 Sep 2025 06:49:22 +0000 (08:49 +0200)] 
tool: fix exponential retry delay

Also, show retry delay with decimals since it might be not be integer
seconds.

Regression from da27db068fc888d7091d347080 (shipped in 8.16.0)

Reported-by: Andrew Olsen
Fixes #18591
Assisted-by: Jay Satiro
Closes #18595

7 weeks agosocks_sspi: restore non-blocking socket on error paths
Joshua Rogers [Wed, 17 Sep 2025 22:43:11 +0000 (03:43 +0500)] 
socks_sspi: restore non-blocking socket on error paths

Closes #18592

7 weeks agotool_cb_hdr: fix fwrite check in header callback
Joshua Rogers [Thu, 18 Sep 2025 01:45:12 +0000 (06:45 +0500)] 
tool_cb_hdr: fix fwrite check in header callback

Compare fwrite result to nmemb (items), not cb (bytes).

Closes #18593

7 weeks agosmtp: check EHLO responses case insensitively
Daniel Stenberg [Wed, 17 Sep 2025 21:22:36 +0000 (23:22 +0200)] 
smtp: check EHLO responses case insensitively

Adjust test 980 to announce starttls in lowercase.

Fixes #18588
Reported-by: Joshua Rogers
Closes #18589

7 weeks agomulti.h: add CURLMINFO_LASTENTRY
Christian Schmitz [Wed, 17 Sep 2025 08:11:59 +0000 (10:11 +0200)] 
multi.h: add CURLMINFO_LASTENTRY

For multiple enums, we use LASTENTRY values to do range checks when
receiving an option as integer. So I added LASTENTRY, so the check will
work, even if you add more options later.

Closes #18578

7 weeks agoconfigure: add "-mt" for pthread support on HP-UX
Michael Osipov [Wed, 17 Sep 2025 18:33:25 +0000 (20:33 +0200)] 
configure: add "-mt" for pthread support on HP-UX

HP-UX requires this compiler and linker flag to pass proper macros and
add required libraries.

Closes #18585

7 weeks agolibcurl-multi.md: added curl_multi_get_offt mention
Christian Schmitz [Wed, 17 Sep 2025 09:04:47 +0000 (11:04 +0200)] 
libcurl-multi.md: added curl_multi_get_offt mention

The multi interface page didn't mention the new curl_multi_get_offt
function.

Closes #18579

7 weeks agomanagen: render better manpage references/links
Daniel Stenberg [Wed, 17 Sep 2025 09:53:33 +0000 (11:53 +0200)] 
managen: render better manpage references/links

- When an option name is used in text, this script no longer outputs the
  short plus long version in the manpage output. It makes the text much
  more readable.

  This always showing both verions was previously done primarily to make
  sure roffit would linkify it correctly, but since roffit 0.17 it
  should link both long or short names correctly.

- When managen outputs generic text about options at the end of the
  description it now highlights them properly so that they too get
  linkified correctly in the HTML version. For consistency.

Closes #18580

7 weeks agomanagen: ignore version mentions < 7.66.0
Daniel Stenberg [Wed, 17 Sep 2025 11:02:01 +0000 (13:02 +0200)] 
managen: ignore version mentions < 7.66.0

Only mention version specific details for versions from within the last
six years.

Closes #18583

7 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 17 Sep 2025 08:30:31 +0000 (10:30 +0200)] 
RELEASE-NOTES: synced

7 weeks agosetopt: make CURLOPT_MAXREDIRS accept -1 (again)
Daniel Stenberg [Wed, 17 Sep 2025 06:25:42 +0000 (08:25 +0200)] 
setopt: make CURLOPT_MAXREDIRS accept -1 (again)

Regression from b059f7d (shipped in 8.16.0)

Reported-by: Adam Light
Fixes #18571
Closes #18576

7 weeks agodocs/libcurl: use lowercase must
Daniel Stenberg [Tue, 16 Sep 2025 14:49:54 +0000 (16:49 +0200)] 
docs/libcurl: use lowercase must

To shout less. Use bold in some places.

Closes #18570

7 weeks agoGHA: update openssl/openssl to v3.5.3
renovate[bot] [Tue, 16 Sep 2025 12:13:10 +0000 (12:13 +0000)] 
GHA: update openssl/openssl to v3.5.3

Closes #18566

7 weeks agodocs/libcurl: clarify some timeout option behavior
Daniel Stenberg [Tue, 16 Sep 2025 14:30:08 +0000 (16:30 +0200)] 
docs/libcurl: clarify some timeout option behavior

Closes #18569

7 weeks agoaws-lc: re-enable large read-ahead with v1.61.0 again
Stefan Eissing [Tue, 16 Sep 2025 13:49:58 +0000 (15:49 +0200)] 
aws-lc: re-enable large read-ahead with v1.61.0 again

AWS-LC fixed a bug with large read ahead buffers in v1.61.0. Check a
define introduced in that version to enable the large read ahead again.

AWS-LC issue: https://github.com/aws/aws-lc/issues/2650

Closes #18568

7 weeks agosws: fix checking `sscanf()` return value
Viktor Szakats [Tue, 16 Sep 2025 10:47:27 +0000 (12:47 +0200)] 
sws: fix checking `sscanf()` return value

Closes #18565

7 weeks agocmake: fix building docs when the base directory contains `.3`
Viktor Szakats [Tue, 16 Sep 2025 08:49:14 +0000 (10:49 +0200)] 
cmake: fix building docs when the base directory contains `.3`

Fixing:
```
ninja: error: '<...>/basedir.md/_bld/docs/libcurl/libcurl-symbols.md',
  needed by 'docs/libcurl/curl_easy_cleanup.3', missing and no known rule to make it
```

Reported-by: Nir Azkiel
Fixes #18560
Follow-up to 898b012a9bf388590c4be7f526815b5ab74feca1 #1288
Closes #18563

7 weeks agoMakefile.example: simplify and make it configurable
Viktor Szakats [Mon, 15 Sep 2025 13:01:54 +0000 (15:01 +0200)] 
Makefile.example: simplify and make it configurable

- build in a single step.

- allow overriding all variables:
  source, target, compiler, libpaths, libs, flags.

Example:
```shell
LIBS= LDFLAGS= SRC=altsvc.c make -f Makefile.example
```

Closes #18554

7 weeks agoGHA/codeql: enable more build options, build servers and tunits
Viktor Szakats [Mon, 15 Sep 2025 19:03:52 +0000 (21:03 +0200)] 
GHA/codeql: enable more build options, build servers and tunits

- add HTTP/3 build with OpenSSL 3.5, nghttp3 and ngtcp2.
- enable GSASL, Heimdal, rtmp, SSLS-export.
- make one build MultiSSL with GnuTLS, mbedTLS, Rustls, wolfSSL.
- build servers (also on Windows), and tunits.
- use Linuxbrew to install build dependencies missing from Ubuntu.

Coverage is now 466 C files. (was: 446)

Closes #18557

7 weeks agokrb5: return appropriate error on send failures
Daniel Stenberg [Tue, 16 Sep 2025 08:27:42 +0000 (10:27 +0200)] 
krb5: return appropriate error on send failures

Closes #18561

7 weeks agoGHA: Update nghttp2/nghttp2 to v1.67.1
renovate[bot] [Mon, 15 Sep 2025 12:00:44 +0000 (12:00 +0000)] 
GHA: Update nghttp2/nghttp2 to v1.67.1

Closes #18552

7 weeks agoGHA: bump actions/checkout from 4.2.2 to 5.0.0
dependabot[bot] [Mon, 15 Sep 2025 14:56:28 +0000 (14:56 +0000)] 
GHA: bump actions/checkout from 4.2.2 to 5.0.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.2...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Closes #18556

7 weeks agoGHA/codeql: tidy up config names
Viktor Szakats [Mon, 15 Sep 2025 13:21:30 +0000 (15:21 +0200)] 
GHA/codeql: tidy up config names

Before this patch there was a single C config detected, named `build:`.

Closes #18555

7 weeks agotidy-up: whitespace
Viktor Szakats [Tue, 2 Sep 2025 12:20:26 +0000 (14:20 +0200)] 
tidy-up: whitespace

Closes #18553

7 weeks agoCURLOPT_TIMECONDITION.md: works for FILE and FTP as well
Daniel Stenberg [Mon, 15 Sep 2025 10:51:58 +0000 (12:51 +0200)] 
CURLOPT_TIMECONDITION.md: works for FILE and FTP as well

Closes #18551

7 weeks agocmdline-docs: extended, clarified, refreshed
Daniel Stenberg [Mon, 15 Sep 2025 08:33:19 +0000 (10:33 +0200)] 
cmdline-docs: extended, clarified, refreshed

Closes #18550

7 weeks agodist: do not distribute `CI.md`
Viktor Szakats [Sun, 14 Sep 2025 21:59:41 +0000 (23:59 +0200)] 
dist: do not distribute `CI.md`

`CI.md` slipped into the 8.15.0, 8.16.0 tarballs by accident.
Remove it again and update the checker exception.

Follow-up to fa3f889752e6b5034966de61a372a60773a69ca8 #17463

Closes #18549

7 weeks agoasyn-thrdd: drop pthread_cancel
Stefan Eissing [Sat, 13 Sep 2025 13:25:53 +0000 (15:25 +0200)] 
asyn-thrdd: drop pthread_cancel

Remove use of pthread_cancel in asnyc threaded resolving. While there
are system where this works, others might leak to resource leakage
(memory, files, etc.). The popular nsswitch is one example where resolve
code can be dragged in that is not prepared.

The overall promise and mechanism of pthread_cancel() is just too
brittle and the historcal design of getaddrinfo() continues to haunt us.

Fixes #18532
Reported-by: Javier Blazquez
Closes #18540

7 weeks agosetopt: accept *_SSL_VERIFYHOST set to 2L
Daniel Stenberg [Sun, 14 Sep 2025 21:28:03 +0000 (23:28 +0200)] 
setopt: accept *_SSL_VERIFYHOST set to 2L

... without outputing a verbose message about it. In the early days we
had 2L and 1L have different functionalities.

Reported-by: Jicea
Bug: https://curl.se/mail/lib-2025-09/0031.html
Closes #18547

7 weeks agoCURLOPT_SSL_VERIFYHOST.md: add see-also to two other VERIFYHOST options
Daniel Stenberg [Sun, 14 Sep 2025 21:30:13 +0000 (23:30 +0200)] 
CURLOPT_SSL_VERIFYHOST.md: add see-also to two other VERIFYHOST options

Closes #18548

7 weeks agotool_getparam: split opt_filestring into two sep functions
Daniel Stenberg [Sun, 14 Sep 2025 12:29:13 +0000 (14:29 +0200)] 
tool_getparam: split opt_filestring into two sep functions

One for file name arguments and one for "strings".

Closes #18546

7 weeks agoGHA/codeql: analyse Windows Schannel WinIDN build
Viktor Szakats [Sun, 14 Sep 2025 12:14:34 +0000 (14:14 +0200)] 
GHA/codeql: analyse Windows Schannel WinIDN build

Follow-up to cc50f05370981e4933504e8aaec6b15880ff847f #18528

Closes #18545

7 weeks agoGHA/distcheck: disable `man-db/auto-update`
Viktor Szakats [Sun, 14 Sep 2025 10:38:29 +0000 (12:38 +0200)] 
GHA/distcheck: disable `man-db/auto-update`

Make sure to not rebuild man pages after purging system curl, to make
the job faster and avoid timeouts:
```
Sun, 14 Sep 2025 10:16:28 GMT Removing curl (8.5.0-2ubuntu10.6) ...
Sun, 14 Sep 2025 10:16:28 GMT Processing triggers for man-db (2.12.0-4build2) ...
Sun, 14 Sep 2025 10:21:22 GMT (Reading database ... 218629 files and directories currently installed.)
```
Ref: https://github.com/curl/curl/actions/runs/17709785947/job/50326910814?pr=18535#step:3:19

Closes #18544

7 weeks agoTODO: remove already implemented or bad items
Daniel Stenberg [Sun, 14 Sep 2025 09:44:35 +0000 (11:44 +0200)] 
TODO: remove already implemented or bad items

- remove "connect to multiple IPs in parallel"
- remove "CURLOPT_RESOLVE for any port number", It can already be
  accomplished with CURLOPT_CONNECT_TO
- remove "dynamically load modules", we don't believe in this
- remove "netrc caching and sharing", we already cache it
- remove "Offer API to flush the connection pool", this is effectively
  what CURLMOPT_NETWORK_CHANGED now allows
- remove "WebSocket read callback", introduced in 8.16.0

Closes #18542

7 weeks agoappveyor: bump to OpenSSL 3.5, adjust to dropped 1.1.1 on VS2019
Viktor Szakats [Sun, 14 Sep 2025 09:55:50 +0000 (11:55 +0200)] 
appveyor: bump to OpenSSL 3.5, adjust to dropped 1.1.1 on VS2019

- bump OpenSSL 3.4 to 3.5 on VS2022 runners.

- bump OpenSSL 1.1.1 to 3.0 on VS2019 runners.
  1.1.1 is documented to be present, but missing.
  Fixes:
  ```
  + cmake -G 'Visual Studio 16 2019' -A x64 [...] -DOPENSSL_ROOT_DIR=C:/OpenSSL-v111-Win64 [...]
  CMake Error at C:/Program Files/CMake/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
    Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
    system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
    OPENSSL_INCLUDE_DIR)
  Call Stack (most recent call first):
    CMakeLists.txt:757 (find_package)
  ```
  Ref: https://ci.appveyor.com/project/curlorg/curl/builds/52740431/job/tq6h4xhqpa3vgq47?fullLog=true
  Ref: https://www.appveyor.com/docs/windows-images-software/
  Ref: https://github.com/appveyor/website/commit/9a739f7bce4a624b28ff382d58a9ebc507ab0f78

Closes #18543

7 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 14 Sep 2025 08:33:38 +0000 (10:33 +0200)] 
RELEASE-NOTES: synced

7 weeks agoGHA: document permissions as required by zizmor 1.13.0
Viktor Szakats [Sat, 13 Sep 2025 15:20:22 +0000 (17:20 +0200)] 
GHA: document permissions as required by zizmor 1.13.0

Ref: https://github.com/zizmorcore/zizmor/pull/1131
Ref: https://docs.zizmor.sh/audits/#undocumented-permissions

Bug: https://github.com/curl/curl/pull/18539#issuecomment-3288151910

Closes #18541

8 weeks agoGHA/codeql: re-enable for C with the default query pack
Viktor Szakats [Thu, 11 Sep 2025 17:50:40 +0000 (19:50 +0200)] 
GHA/codeql: re-enable for C with the default query pack

Earlier we used `security-extended` and tried `security-and-quality`.
Try the default to see how it works.

CodeQL no longer uses the project's Actions cache, also fixing
the previously seen repeat cache entry issue.

- switch to `manual` build. It's 3x faster than the default `autobuild`.
- enable more dependencies to increase coverage.
- docs/tests/CI.md: re-add CodeQL.

Ref: https://docs.github.com/en/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites
Ref: https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
Ref: #16263
Ref: 173805b2e76960de5c51fd5fe64286d8ac81f1ff #15798

Closes #18528

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