]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 months agoGHA/curl-for-win: use `DOCKER_IMAGE_STABLE`
Viktor Szakats [Wed, 24 Sep 2025 15:44:47 +0000 (17:44 +0200)] 
GHA/curl-for-win: use `DOCKER_IMAGE_STABLE`

Replacing the hard-wired stable image. After this patch, it
will automatically follow upstream updates.

Follow-up to https://github.com/curl/curl-for-win/commit/6870bc1b35baff03168af1d0506ec8610851a819
Follow-up to https://github.com/curl/curl-for-win/commit/5a25df253da4f68de52b14a2e612df5fc60b8aa6

Closes #18709

2 months agodocs: fix/tidy code fences
Viktor Szakats [Wed, 24 Sep 2025 12:53:18 +0000 (14:53 +0200)] 
docs: fix/tidy code fences

- INSTALL.md: fence code to avoid wrong rendering.
Reported-by: rinsuki on github
Fixes: https://github.com/curl/curl-www/issues/480
- use `sh` instead of `bash` as fence language, for less visual noise.

- INSTALL.md: drop stray shebang.

- ECH.md: drop indent from fenced code.

- minor tidy-ups.

Ref: https://curl.se/docs/install.html

Closes #18707

2 months agohostip: remove unnecessary leftover INT_MAX check in Curl_dnscache_prune
Daniel Stenberg [Mon, 22 Sep 2025 08:30:15 +0000 (10:30 +0200)] 
hostip: remove unnecessary leftover INT_MAX check in Curl_dnscache_prune

The math already uses timediff_t so no need for the extra logic

Ref: #18678
Closes #18680

2 months agoRevert "cf_socket_recv: don't count reading zero bytes as first byte"
Daniel Stenberg [Mon, 22 Sep 2025 07:10:39 +0000 (09:10 +0200)] 
Revert "cf_socket_recv: don't count reading zero bytes as first byte"

This reverts commit df60e8fe701e189e7629fd08b61950a0fb1b697a.

The "first byte" checkpoint is not strictly the first byte received, but
the sign of first traffic from the server, which a closed connection
also is.

Closes #18676

2 months agosocks_gssapi: reject too long tokens
Daniel Stenberg [Mon, 22 Sep 2025 09:08:43 +0000 (11:08 +0200)] 
socks_gssapi: reject too long tokens

If GSS returns a token to use that is longer than 65535 bytes, it can't
be transmitted since the length field is an unisgned 16 bit field and
thus needs to trigger an error.

Reported in Joshua's sarif data

Closes #18681

2 months agoares: fix leak in tracing
Stefan Eissing [Tue, 23 Sep 2025 07:55:11 +0000 (09:55 +0200)] 
ares: fix leak in tracing

When DNS tracing is enabled, a string allocated by ares was not freed.

Reported-by: jmaggard10 on github
Bug: https://github.com/curl/curl/pull/18251#pullrequestreview-3255785083
Closes #18691

2 months agoGHA: Update ngtcp2/ngtcp2 to v1.16.0
renovate[bot] [Wed, 24 Sep 2025 09:26:25 +0000 (09:26 +0000)] 
GHA: Update ngtcp2/ngtcp2 to v1.16.0

Closes #18706

2 months agoGHA: update ngtcp2/nghttp3 to v1.12.0
renovate[bot] [Wed, 24 Sep 2025 09:26:19 +0000 (09:26 +0000)] 
GHA: update ngtcp2/nghttp3 to v1.12.0

Closes #18705

2 months agoGHA/distcheck: bump timeout for the cmake integration
Viktor Szakats [Wed, 24 Sep 2025 08:16:05 +0000 (10:16 +0200)] 
GHA/distcheck: bump timeout for the cmake integration

It may take 1.5 minutes to find the C compiler on macos with old cmake.
The build is also slow due to no unity and Ninja support.

```
Wed, 24 Sep 2025 04:56:51 GMT -- Using CMake version 3.11.4
Wed, 24 Sep 2025 04:58:01 GMT -- The C compiler identification is AppleClang 17.0.0.17000013
Wed, 24 Sep 2025 04:58:02 GMT -- Check for working C compiler: /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Wed, 24 Sep 2025 04:59:33 GMT -- Check for working C compiler: /Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
Wed, 24 Sep 2025 04:59:33 GMT -- Detecting C compiler ABI info
Wed, 24 Sep 2025 04:59:35 GMT -- Detecting C compiler ABI info - done
```
Ref: https://github.com/curl/curl/actions/runs/17966736478/job/51100678487?pr=18700#step:10:50

Closes #18702

2 months agoGHA/dist: fix number of parallel jobs on macos runner
Viktor Szakats [Wed, 24 Sep 2025 08:29:30 +0000 (10:29 +0200)] 
GHA/dist: fix number of parallel jobs on macos runner

It was using the global parallel value in cmake integration tests, while
on macos runners, this should be lower by one, as used in other macos
jobs. Performance impact is minimal.

Follow-up to fb70812437ad28b74dbdc1031e46c1d86bc9db3c #16126
Closes #18701

2 months agoGHA: update dependency awslabs/aws-lc to v1.61.3
renovate[bot] [Mon, 22 Sep 2025 22:35:46 +0000 (22:35 +0000)] 
GHA: update dependency awslabs/aws-lc to v1.61.3

Closes #18690

2 months agoGHA/macos: add macos-26, llvm20, gcc15, drop macos-14, gcc14
Viktor Szakats [Tue, 23 Sep 2025 13:45:49 +0000 (15:45 +0200)] 
GHA/macos: add macos-26, llvm20, gcc15, drop macos-14, gcc14

Number of combo jobs down to 22 from 24.

Also:
- update the version matrix.
- update exclusion matrix.
- include verbose compiler configuration dump.
  It makes the Apple-included, default `-I/usr/local/include` visible.
  Ref: #18683

Closes #18698

2 months agoGHA/linux: enable libidn2 and libssh in asan job
Viktor Szakats [Tue, 23 Sep 2025 10:47:45 +0000 (12:47 +0200)] 
GHA/linux: enable libidn2 and libssh in asan job

Closes #18697

2 months agoGHA/linux: fix address sanitizer error output
Viktor Szakats [Tue, 23 Sep 2025 09:50:23 +0000 (11:50 +0200)] 
GHA/linux: fix address sanitizer error output

Same issue as seen earlier in the tsan job. Fix it the same way, by
switching to cmake to avoid autotools' libtool confusing the analyzer.
Ref: 2a46df31fdb91851895bc46d81f0065e6cafc80b #18274

Configuration remains identical. I removed libssh2 from the installed
packages, because it was unused before, but cmake enabled it by default
and libssh2 has memory leaks:
Ref: https://github.com/curl/curl/actions/runs/17941312820/job/51018425159

Fixing:
```
/usr/bin/llvm-symbolizer-18: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: no version information available (required by /usr/bin/llvm-symbolizer-18)
/usr/bin/llvm-symbolizer-18: symbol lookup error: /home/runner/work/curl/curl/bld/lib/.libs/libcurl.so.4: undefined symbol: __asan_option_detect_stack_use_after_return
==33900==WARNING: Can't read from symbolizer at fd 3
[..]
==33900==WARNING: Can't write to symbolizer at fd 6
==33900==WARNING: Failed to use and restart external symbolizer
```
Ref: https://github.com/curl/curl/actions/runs/17939949191/job/51013953675?pr=18693

Cherry-picked from #18693
Closes #18696

2 months agoGHA/codeql: build `units` on Linux
Viktor Szakats [Tue, 23 Sep 2025 09:19:18 +0000 (11:19 +0200)] 
GHA/codeql: build `units` on Linux

Closes #18695

2 months agotidy-up: URLs
Viktor Szakats [Mon, 22 Sep 2025 21:58:41 +0000 (23:58 +0200)] 
tidy-up: URLs

Closes #18689

2 months agocmake: use modern alternatives for `get_filename_component()`
Viktor Szakats [Mon, 22 Sep 2025 16:02:49 +0000 (18:02 +0200)] 
cmake: use modern alternatives for `get_filename_component()`

- use `cmake_path()` to query filenames, with CMake 3.20 or upper.
  https://cmake.org/cmake/help/v4.1/command/cmake_path.html#query

- use `cmake_host_system_information()` to query the registry,
  with CMake 3.24 or upper.
  https://cmake.org/cmake/help/v4.1/command/cmake_host_system_information.html#query-windows-registry
  Replacing the undocumented method.

- also quote the value passed to `get_filename_component()` where
  missing. (Could not cause an actual issue as used in the code.)

Closes #18688

2 months agoGHA: enable more options in static analyzer jobs
Viktor Szakats [Sat, 20 Sep 2025 09:43:59 +0000 (11:43 +0200)] 
GHA: enable more options in static analyzer jobs

This is an effort to pass more code through clang-tidt and scan-build
static analyzers. Following CodeQL Linux jobs.

GHA/codeql:
- also build with libssh.
- disable verbose output in build steps.

GHA/linux:
- enable more build options for the clang-tidy and scan-build jobs:
  libidn2, nghttp2, ldap, kerberos, rtmp, gnutls, gsasl, rustls,
  mbedtls, wolfssl
  Use Linuxbrew where necessary.
- also enable ECH, gssapi in the scan-build job.
- fix 'scanbuild' to be 'scan-build' in the job name.

GHA/macos:
- build with Rustls in the clang-tidy job.
- add a new clang-tidy job to test HTTP/3 (with openssl + ngtcp2).
- build with libssh in one of the clang-tidy jobs.
- build with LibreSSL in the MultiSSL clang-tidy job.
- build with heimdal and kerberos in the clang-tidy jobs respectively.
- build with OpenLDAP in one clang-tidy job.
- add support for `skipall`, `skiprun` job options, and use it.

Closes #18660

2 months agolibssh: drop two unused assigments
Viktor Szakats [Mon, 22 Sep 2025 09:27:10 +0000 (11:27 +0200)] 
libssh: drop two unused assigments

Reported in macOS clang-tidy v21.1.1 build, after enabling libssh in it:
```
lib/vssh/libssh.c
lib/vssh/libssh.c:1342:9: error: Value stored to 'to_t' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
 1342 |         to_t = STRE_OK;
      |         ^
lib/vssh/libssh.c:1342:9: note: Value stored to 'to_t' is never read
lib/vssh/libssh.c:1349:9: error: Value stored to 'from_t' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
 1349 |         from_t = STRE_OK;
      |         ^
lib/vssh/libssh.c:1349:9: note: Value stored to 'from_t' is never read
2 warnings generated.
```
Ref: https://github.com/curl/curl/actions/runs/17909917954/job/50918955923?pr=18660#step:11:182

Cherry-picked from #18660
Closes #18684

2 months agoGHA/linux: install zlib in all jobs by default
Viktor Szakats [Sun, 21 Sep 2025 17:48:22 +0000 (19:48 +0200)] 
GHA/linux: install zlib in all jobs by default

Cherry-picked from #18660
Closes #18672

2 months agoautotools: capitalize 'Rustls' in the log output
Viktor Szakats [Mon, 22 Sep 2025 00:03:08 +0000 (02:03 +0200)] 
autotools: capitalize 'Rustls' in the log output

To match the rest of the codebase.

Follow-up to 548d8a842123c854ba92aac90a24c6191e2a8bd4
Cherry-picked from #18660
Closes #18671

2 months agorustls: fix clang-tidy warning
Viktor Szakats [Sun, 21 Sep 2025 19:55:30 +0000 (21:55 +0200)] 
rustls: fix clang-tidy warning

Seen with v21.1.1, non-debug-enabled build:
```
lib/vtls/rustls.c:415:23: error: File position of the stream might be 'indeterminate'
after a failed operation. Can cause undefined behavior [clang-analyzer-unix.Stream,-warnings-as-errors]
  415 |     const size_t rr = fread(buf, 1, sizeof(buf), f);
      |                       ^
```
Ref: https://github.com/curl/curl/actions/runs/17898248031/job/50887746633?pr=18660#step:11:174

Cherry-picked from #18660
Closes #18670

2 months agotool_doswin: fix to use curl socket functions
Viktor Szakats [Sat, 20 Sep 2025 11:34:08 +0000 (13:34 +0200)] 
tool_doswin: fix to use curl socket functions

Replace `WSASocketW()` with `CURL_SOCKET()`. Also replace a call
to `socketclose()` with `sclose()`. According to a comment,
`socketclose()` was chosen to silence test 1498 (and 2300) reporting
`MEMORY FAILURE`. These reports were accurate, and were caused by
calling `WSASocketW()` instead of `socket()` (now `CURL_SOCKET()`).

This also fixes the curl `sclose()` call on an error branch, which is
now correctly paired with a curl socket open. The mismatched open/close
calls caused an issue in TrackMemory-enabled (aka `CURLDEBUG`) builds.

Docs confirm that `socket()` is defaulting to overlapped I/O, matching
the replaced `WSASocketW()` call:
https://learn.microsoft.com/windows/win32/api/winsock2/nf-winsock2-socket#remarks

Also:
- checksrc: ban `WSASocket*()` functions.
- report `SOCKERRNO` instead of `GetLastError()` for socket calls,
  to match the rest of the codebase.

Follow-up to 9a2663322c330ff11275abafd612e9c99407a94a #17572

Closes #18633

2 months agomanagen: strict protocol check
Daniel Stenberg [Mon, 22 Sep 2025 06:33:20 +0000 (08:33 +0200)] 
managen: strict protocol check

- protocols MUST match one in the accept-list
- protocols are typically all uppercase
- drop All
- use SCP and SFTP instead of SSH
- add Protocols: to some options previously missing one

Closes #18675

2 months agotftp: pin the first used address
Daniel Stenberg [Sun, 21 Sep 2025 09:07:31 +0000 (11:07 +0200)] 
tftp: pin the first used address

Store the used remote address on the first receive call and then make
sure that it remains the same address on subsequent calls to reduce the
risk of tampering. Doesn't make the transfer secure because it is still
unauthenticated and clear text.

Reported in Joshua's sarif data

Closes #18658

2 months agotelnet: refuse IAC codes in content
Daniel Stenberg [Sun, 21 Sep 2025 08:48:00 +0000 (10:48 +0200)] 
telnet: refuse IAC codes in content

Ban the use of IAC (0xff) in telnet options set by the application. They
need to be escaped when sent but I can't see any valid reason for an
application to send them.

Of course, an application sending such data basically ask for trouble.

Reported in Joshua's sarif data

Closes #18657

2 months agoautotools: add support for libgsasl auto-detection via pkg-config
Viktor Szakats [Sun, 21 Sep 2025 18:25:04 +0000 (20:25 +0200)] 
autotools: add support for libgsasl auto-detection via pkg-config

Enable with `--with-gsasl`, as before.

Cherry-picked from #18660
Closes #18669

2 months agoautotools: fix duplicate `UNIX` and `BSD` flags in `buildinfo.txt`
Viktor Szakats [Sun, 21 Sep 2025 16:02:21 +0000 (18:02 +0200)] 
autotools: fix duplicate `UNIX` and `BSD` flags in `buildinfo.txt`

Follow-up to 2a292c39846107228201674d686be5b3ed96674d #15975

Closes #18667

2 months agoautotools: fix silly mistake in clang detection for `buildinfo.txt`
Viktor Szakats [Sun, 21 Sep 2025 15:51:34 +0000 (17:51 +0200)] 
autotools: fix silly mistake in clang detection for `buildinfo.txt`

Follow-up to 0513f9f8786e0cc4246e05d56bd264d0292d9c92 #18645

Closes #18666

2 months agotidy-up: assortment of small fixes
Viktor Szakats [Thu, 21 Aug 2025 20:27:41 +0000 (22:27 +0200)] 
tidy-up: assortment of small fixes

- examples/headerapi: fix wrong cast.
- curl_ngtcp2: delete stray character from error message.
- rustls: fix inline variable declaration.
- sendf: drop redundant `int` cast.
- libtest/cli_ws_data: drop cast with mismatched signedness.

Cherry-picked from #18343

Closes #18664

2 months agocmake: clang detection tidy-ups
Viktor Szakats [Sun, 21 Sep 2025 11:31:35 +0000 (13:31 +0200)] 
cmake: clang detection tidy-ups

Follow-up to 0513f9f8786e0cc4246e05d56bd264d0292d9c92 #18645
Follow-up to fe5225b5eaf3a1a0ce149023d38a9922a114798b #18209

Closes #18659

2 months agoGHA/codeql: enable ECH and HTTPS-RR
Viktor Szakats [Sat, 20 Sep 2025 09:35:01 +0000 (11:35 +0200)] 
GHA/codeql: enable ECH and HTTPS-RR

Switch to Linuxbrew c-ares to hit the minimum version.
(Ubuntu offers 1.27.0, HTTPS-RR requires 1.28.0.)

Closes #18661

2 months agows: reject curl_ws_recv called with NULL buffer with a buflen
Daniel Stenberg [Sun, 21 Sep 2025 08:18:13 +0000 (10:18 +0200)] 
ws: reject curl_ws_recv called with NULL buffer with a buflen

Arguably this is just a bad application.

Reported in Joshua's sarif data

Closes #18656

2 months agoopenldap: check ldap_get_option() return codes
Daniel Stenberg [Sat, 20 Sep 2025 21:53:52 +0000 (23:53 +0200)] 
openldap: check ldap_get_option() return codes

Do not just assume that they always work.

Reported in Joshua's sarif data

Closes #18653

2 months agolibssh: fix range parsing error handling mistake
Daniel Stenberg [Sat, 20 Sep 2025 21:38:04 +0000 (23:38 +0200)] 
libssh: fix range parsing error handling mistake

The range-parsing returned CURLE_RANGE_ERROR directly on one error
instead of calling myssh_to_ERROR() like it should and like it does for
all other errors.

Reported in Joshua's sarif data

Closes #18652

2 months agorustls: use %zu for size_t in failf() format string
Daniel Stenberg [Sat, 20 Sep 2025 21:33:05 +0000 (23:33 +0200)] 
rustls: use %zu for size_t in failf() format string

Reported in Joshua's sarif data

Closes #18651

2 months agoftp: fix ftp_do_more returning with *completep unset
Daniel Stenberg [Sat, 20 Sep 2025 21:23:07 +0000 (23:23 +0200)] 
ftp: fix ftp_do_more returning with *completep unset

Specifically, when ftpc->wait_data_conn was true and
Curl_conn_connect(...) returned with serv_conned == false the code
called ftp_check_ctrl_on_data_wait and returned without setting
*completep.

Now set it to 0 at function start to avoid this happening again.

Reported in Joshua's sarif data

Closes #18650

2 months agotelnet: return error on crazy TTYPE or XDISPLOC lengths
Daniel Stenberg [Sat, 20 Sep 2025 20:55:50 +0000 (22:55 +0200)] 
telnet: return error on crazy TTYPE or XDISPLOC lengths

Also use the packet size msnprintf() stores instead of calculating it
separately.

Reported in Joshua's sarif data

Closes #18648

2 months agovtls_int.h: clarify data_pending
Daniel Stenberg [Sat, 20 Sep 2025 15:44:32 +0000 (17:44 +0200)] 
vtls_int.h: clarify data_pending

Suggested-by: Joseph Birr-Pixton
Closes #18644

2 months agows: clarify an error message
Daniel Stenberg [Sat, 20 Sep 2025 22:09:09 +0000 (00:09 +0200)] 
ws: clarify an error message

Instead of:

 "[WS] frame length longer than 64 signed not supported"

Use:

 "[WS] frame length longer than 63 bit not supported"

Closes #18654

2 months agoRELEASE-NOTES: spellcheck!
Daniel Stenberg [Sun, 21 Sep 2025 07:39:58 +0000 (09:39 +0200)] 
RELEASE-NOTES: spellcheck!

2 months agobuild: show llvm/clang in platform flags and `buildinfo.txt`
Viktor Szakats [Sat, 20 Sep 2025 17:04:21 +0000 (19:04 +0200)] 
build: show llvm/clang in platform flags and `buildinfo.txt`

Show these flags:
- `LLVM-CLANG` for mainline llvm/clang.
- `APPLE-CLANG` for Apple clang.
- `CLANG-CL` for clang-cl. (cmake only)

Also:
- GHA/linux: fix a job to build with clang, to match its descriptions.

Closes #18645

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 20 Sep 2025 22:05:55 +0000 (00:05 +0200)] 
RELEASE-NOTES: synced

2 months agowrite-out: make %header{} able to output *all* occurances of a header
Daniel Stenberg [Sun, 7 Sep 2025 22:18:52 +0000 (00:18 +0200)] 
write-out: make %header{} able to output *all* occurances of a header

By appending `:all:[separator]` to the header name. The `[separator]` string
is output between each header value if there are more than one to output.

Test 764 and 765 verify

Idea-by: kapsiR on github
Ref: #18449
Closes #18491

2 months agokrb5: drop support for Kerberos FTP
Daniel Stenberg [Wed, 17 Sep 2025 06:32:39 +0000 (08:32 +0200)] 
krb5: drop support for Kerberos FTP

It was accidentally broken in commit 0f4c439fc7347f499cf5, shipped since
8.8.0 (May 2024) and yet not a single person has noticed or reported,
indicating that we might as well drop support for FTP Kerberos.

Krb5 support was added in 54967d2a3ab55596314 (July 2007), and we have
been carrying the extra license information around since then for this
code. This commit removes the last traces of that code and thus we can
remove the extra copyright notices along with it.

Reported-by: Joshua Rogers
Closes #18577

2 months agoopenssl: make the asn1_object_dump name null terminated
Daniel Stenberg [Sat, 20 Sep 2025 20:49:46 +0000 (22:49 +0200)] 
openssl: make the asn1_object_dump name null terminated

In case the buffer is too small.

Reported in Joshua's sarif data

Closes #18647

2 months agolibssh2: up the minimum requirement to 1.9.0
Daniel Stenberg [Fri, 19 Sep 2025 07:32:42 +0000 (09:32 +0200)] 
libssh2: up the minimum requirement to 1.9.0

Released on June 20 2019

2 months agohttpsrr: free old pointers when storing new
Daniel Stenberg [Sat, 20 Sep 2025 10:12:02 +0000 (12:12 +0200)] 
httpsrr: free old pointers when storing new

In case we get "funny" input and the same field is provided several
times, free the old pointer before stored a new memdup.

Reported in Joshua's sarif data

Closes #18631

2 months agoopenldap: improve check for receiving blank data
Daniel Stenberg [Sat, 20 Sep 2025 10:21:26 +0000 (12:21 +0200)] 
openldap: improve check for receiving blank data

It can't access the first byte either unless it has length.

Followup to 232d5a2ed9c091c88e3b724a1e7d6

Closes #18632

2 months agotftp: return error when sendto() fails
Daniel Stenberg [Sat, 20 Sep 2025 15:40:17 +0000 (17:40 +0200)] 
tftp: return error when sendto() fails

The code just called failf() and then continued without returning error.

Reported in Joshua's sarif data

Closes #18643

2 months agolibssh: return out of memory correctly if aprintf fails
Daniel Stenberg [Sat, 20 Sep 2025 12:51:01 +0000 (14:51 +0200)] 
libssh: return out of memory correctly if aprintf fails

The code called set sshc->nextstate and returned SSH_OK without setting
sshc->actualcode to an error code.

Reported in Joshua's sarif data

Closes #18637

2 months agocf-socket: use the right byte order for ports in bindlocal
Daniel Stenberg [Sat, 20 Sep 2025 14:56:14 +0000 (16:56 +0200)] 
cf-socket: use the right byte order for ports in bindlocal

Reported in Joshua's sarif data

Closes #18641

2 months agoschannel: assign result before using it
Daniel Stenberg [Sat, 20 Sep 2025 15:14:10 +0000 (17:14 +0200)] 
schannel: assign result before using it

curl_easy_strerror(result) was called *before* result was assigned.

Reported in Joshua's sarif data

Closes #18642

2 months agoCURLOPT_HEADER/WRITEFUNCTION.md: drop '* size' since size is always 1
Daniel Stenberg [Sat, 20 Sep 2025 14:47:16 +0000 (16:47 +0200)] 
CURLOPT_HEADER/WRITEFUNCTION.md: drop '* size' since size is always 1

Closes #18640

2 months agolibssh: error on bad chown number and store the value
Daniel Stenberg [Sat, 20 Sep 2025 13:00:37 +0000 (15:00 +0200)] 
libssh: error on bad chown number and store the value

To avoid continuing with an unintended zero uid. Also actually use the
value, which was omitted before!

Reported in Joshua's sarif data

Closes #18639

2 months agotftp: handle tftp_multi_statemach() return code
Daniel Stenberg [Sat, 20 Sep 2025 12:56:03 +0000 (14:56 +0200)] 
tftp: handle tftp_multi_statemach() return code

Previously just ignored.

Reported in Joshua's sarif data

Closes #18638

2 months agoftp: fix port number range loop for PORT commands
Daniel Stenberg [Sat, 20 Sep 2025 12:45:47 +0000 (14:45 +0200)] 
ftp: fix port number range loop for PORT commands

If the last port to test is 65535, the loop would previously wrongly
wrap the counter and start over at 0, which was not intended.

Reported in Joshua's sarif data

Closes #18636

2 months agosocks: make Curl_blockread_all return CURLcode
Daniel Stenberg [Sat, 20 Sep 2025 12:29:44 +0000 (14:29 +0200)] 
socks: make Curl_blockread_all return CURLcode

Reported in Joshua's sarif data

Closes #18635

2 months agoGHA/codeql: drop winbuild references [ci skip]
Viktor Szakats [Sat, 20 Sep 2025 13:07:15 +0000 (15:07 +0200)] 
GHA/codeql: drop winbuild references [ci skip]

Follow-up to 8d004781a577fc2fae72873c4a45b2fb3f366d98 #18040

2 months agobuild: avoid overriding system symbols for socket functions
Viktor Szakats [Tue, 9 Sep 2025 13:29:12 +0000 (15:29 +0200)] 
build: avoid overriding system symbols for socket functions

Before this patch `accept4()`, `socket()`, `socketpair()`, `send()` and
`recv()` system symbols were remapped via macros, using the same name,
to local curl debug wrappers. This patch replaces these overrides by
introducing curl-namespaced macros that map either to the system symbols
or to their curl debug wrappers in `CURLDEBUG` (TrackMemory) builds.

This follows a patch that implemented the same for `accept()`.

The old method required tricks to make these redefines work in unity
builds, and avoid them interfering with system headers. These tricks
did not work for system symbols implemented as macros.

The new method allows to setup these mappings once, without interfering
with system headers, upstream macros, or unity builds. It makes builds
more robust.

Also:
- checksrc: ban all mapped functions.
- docs/examples: tidy up checksrc rules.

Follow-up to 9863599d69b79d290928a89bf9160f4e4e023d4e #18502
Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827

Closes #18503

2 months agorustls: typecast variable for safer trace output
Daniel Stenberg [Sat, 20 Sep 2025 09:17:48 +0000 (11:17 +0200)] 
rustls: typecast variable for safer trace output

This is a variadic function call with a mismatched argument type; on
platforms where uintptr_t and size_t differ, this invokes undefined
behavior.

Reported in Joshua's sarif data

Closes #18628

2 months agotool_cb_hdr: size is always 1
Daniel Stenberg [Sat, 20 Sep 2025 09:31:54 +0000 (11:31 +0200)] 
tool_cb_hdr: size is always 1

- add comment in the header that the argument 'size' is always 1,
  as guaranteed by the libcurl API

- then fix the call to fwrite() to avoid using "size, etag_length" which
  would be wrong if size was something else than 1, and use a fixed
  number there instead.

Reported in Joshua's sarif data

Closes #18630

2 months agolibssh: error on bad chgrp number
Daniel Stenberg [Sat, 20 Sep 2025 09:25:38 +0000 (11:25 +0200)] 
libssh: error on bad chgrp number

To avoid it continuing with a zero gid.

Reported in Joshua's sarif data

Closes #18629

2 months agocurl_slist_append.md: clarify that a NULL pointer is not acceptable
Daniel Stenberg [Sat, 20 Sep 2025 09:11:35 +0000 (11:11 +0200)] 
curl_slist_append.md: clarify that a NULL pointer is not acceptable

Closes #18627

2 months agotidy-up: update MS links, allow long URLs via `checksrc`
Viktor Szakats [Fri, 19 Sep 2025 20:22:14 +0000 (22:22 +0200)] 
tidy-up: update MS links, allow long URLs via `checksrc`

- update Microsoft documentation links.
  (also drop language designator where present.)

- checksrc: allow longer than 78 character lines if they
  contain a https URL. To make these links easier to use and parse.

- merge links that were split into two lines.

Closes #18626

2 months agobuild: address some `-Weverything` warnings, update picky warnings
Viktor Szakats [Thu, 4 Sep 2025 09:56:33 +0000 (11:56 +0200)] 
build: address some `-Weverything` warnings, update picky warnings

`-Weverything` is not enabled by curl, and not recommended by LLVM,
because it may enable experimental options, and will result in new
fallouts after toolchain upgrades. This patch aims to fix/silence as much
as possible as found with llvm/clang 21.1.0. It also permanently enables
warnings that were fixed in source and deemed manageable in the future.
`-Wformat` warnings are addressed separately via #18343.

Fix/silence warnings in the source:
- typecheck-gcc.h: fix `-Wreserved-identifier`.
- lib: silence `-Wcast-function-type-strict`.
  For llvm 16+ or Apple clang 16+.
- asyn-ares: limit `HAPPY_EYEBALLS_DNS_TIMEOUT` to old c-ares versions.
- curl_trc: fix `-Wc++-hidden-decl`.
- doh: fix `-Wc++-keyword`.
- ftp: fix `-Wreserved-identifier`.
- ldap: fix `-Wreserved-identifier`.
- mqtt: comment unused macro to avoid warning.
- multi_ev: drop unused macros to avoid warnings.
- setopt: fix useless `break;` after `return;`.
- gtls, mbedtls, rustls: silence `-Wconditional-uninitialized`.
- socks_sspi, schannel, x509asn1: fix `-Wimplicit-int-enum-cast`.
- x509asn1: fix `-Wc++-keyword`.
- openssl: scope `OSSL_UI_METHOD_CAST` to avoid unused macro warning.
- libssh2, wolfssl: drop unused macros.
- curl_ngtcp2, curl_quiche, httpsrr, urlapi: drop/limit unused macros.
- tool_getparam: fix useless `break;` after `return;` or `break;`.
  Not normally enabled because it doesn't work with unity.
  https://github.com/llvm/llvm-project/issues/71046
- tool_operate: fix `-Wc++-keyword`.
- curlinfo: fix a `-Wunsafe-buffer-usage`.
- tests: silence `-Wformat-non-iso`.
- lib557: fix `-Wreserved-identifier`.
- lib1565: silence `-Wconditional-uninitialized`.

Enable the above clang warnings permanently in picky mode:
- `-Wc++-hidden-decl`
- `-Wc++-keyword` (except for Windows, where it collides with `wchar_t`)
- `-Wcast-function-type-strict`
- `-Wcast-function-type`
- `-Wconditional-uninitialized`
- `-Wformat-non-iso` (except for clang-cl)
- `-Wreserved-identifier`
- `-Wtentative-definition-compat`

Silence problematic `-Weverything` warnings globally (in picky mode):
- `-Wused-but-marked-unused` (88000+ hits) and
  `-Wdisabled-macro-expansion` (2600+ hits).
  Triggered by `typecheck-gcc.h` when building with clang 14+.
  Maybe there exists a way to fix within that header?
  Ref: https://discourse.llvm.org/t/removing-wused-but-marked-unused/55310
- `-Wunsafe-buffer-usage`. clang 16+. 7000+ hits.
  May be useful in theory, but such high volume of hits makes it
  impractical to review and possibly address. Meant for C++.
  Ref: https://clang.llvm.org/docs/SafeBuffers.html
  Ref: https://stackoverflow.com/questions/77017567/how-to-fix-code-to-avoid-warning-wunsafe-buffer-usage
  Ref: https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734
  Ref: https://github.com/llvm/llvm-project/pull/111624
- `-Wimplicit-void-ptr-cast`. clang 21+. 1700+ hits.
  C++ warning, deemed pure noise.
  Ref: https://github.com/curl/curl/issues/18470#issuecomment-3253506266
- `-Wswitch-default` (180+ hits), `-Wswitch-enum` (190+ hits),
  `-Wcovered-switch-default` (20+ hits).
  Next to impossible to fix cleanly, esp. when the covered `case`
  branches depend on compile-time options.
- `-Wdocumentation-unknown-command` (8+ hits).
  Triggered in a few sources. Seems arbitrary and bogus.
- `-Wpadded` (550+ hits).
- `-Wc++-keyword` on Windows, where it collides with `wchar_t`.
  (100+ hits)
  Ref: https://github.com/llvm/llvm-project/issues/155988
- `-Wreserved-macro-identifier`. clang 13+. 5+ hits.
  Sometimes it's necessary to set external macros that use
  the reserved namespace. E.g. `_CRT_NONSTDC_NO_DEPRECATE`,
  `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__`, `__NO_NET_API`,
  possibly `_REENTRANT`, and more.
  It's not worth trying to silence them individually.
- `-Wnonportable-system-include-path` with `clang-cl`.
  It'd be broken by doing what the warning suggests.
- `-Wformat-non-iso` for clang-cl.

CMake `PICKY_COMPILER=ON` (the default) or `./configure`
`--enable-warnings` (not the default) is required to enable these
silencing rules.

Also:
- autotools, cmake: fix Apple clang and mainline llvm version translations.
  Ref: https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
- autotools, cmake: enable `-Warray-compare` for clang 20+.
  Follow-up to 4b7accda5ae3f2e663aa3f3853805241ef87c2fe #17196
- cmake: fix to enable `-Wmissing-variable-declarations` at an earlier
  clang version.
- cmake: update internal logic to handle warning options with `+` in
  them.
- cmake: fix internal logic to match the whole option when looking
  into `CMAKE_C_FLAGS` for custom-disabled warnings.

Follow-up to b85cb8cb4e143d1615d4fcc1ce8f2f7b66453995 #18485

Closes #18477

2 months agowindows: stop passing unused, optional argument for Win9x compatibility
Viktor Szakats [Sun, 7 Sep 2025 19:42:41 +0000 (21:42 +0200)] 
windows: stop passing unused, optional argument for Win9x compatibility

Expiry timestamp in `AcquireCredentialsHandle()` (SSPI) and
`InitializeSecurityContext()` (Schannel) calls. The argument is optional
in both. The returned value was never used in curl. The reason for
passing it was Windows 95 compatibility, according to comments in
the SSPI code. curl no longer supports Windows 95.

Ref: https://learn.microsoft.com/windows/win32/api/sspi/nf-sspi-acquirecredentialshandlea
Ref: https://learn.microsoft.com/windows/win32/secauthn/initializesecuritycontext--schannel

Ref: 3fe531196771c8e81f917eebca4a06e062ab3a19
Ref: aaa42aa0d594b95c6c670a373ba30c507aa0a5ed

Closes #18490

2 months agotidy-up: avoid using the reserved macro namespace
Viktor Szakats [Fri, 5 Sep 2025 08:44:06 +0000 (10:44 +0200)] 
tidy-up: avoid using the reserved macro namespace

To avoid hitting `-Wreserved-macro-identifier` where possible.

- amigaos: introduce local macro instead of reusing `__request()`.
- easy_lock: avoid redefining `__has_builtin()`.
  Follow-up to 33fd57b8fff8c0d873da2316a2a7f911caac2bae #9062
- rand: drop interim macro `_random()`.
- windows: rename local macro `_tcsdup()` to `Curl_tcsdup()`.
  To avoid using the reserved macro namespace and to avoid
  colliding with `_tcsdup()` as defined by Windows headers.
- checksrc: ban `_tcsdup()` in favor of `Curl_tcsdup()`.
- tool_doswin: avoid redefining `_use_lfn()` (MS-DOS).
- tool_findfile: limit `__NO_NET_API` hack to AmigaOS.
  Syncing this pattern with `lib/netrc.c`.
  Follow-up to 784a8ec2c1a3cc4bd676077a28a0d5f6ee7786a5 #16279
- examples/http2-upload: avoid reserved namespace for local macro.

More cases will be removed when dropping WinCE support via #17927.

Cases remain when defining external macros out of curl's control.

Ref: #18477
Closes #18482

2 months agodigest_sspi: fix two memory leaks in error branches
Viktor Szakats [Sun, 7 Sep 2025 15:30:05 +0000 (17:30 +0200)] 
digest_sspi: fix two memory leaks in error branches

Closes #18488

2 months agocmake: add `CURL_CODE_COVERAGE` option
Viktor Szakats [Wed, 3 Sep 2025 12:32:29 +0000 (14:32 +0200)] 
cmake: add `CURL_CODE_COVERAGE` option

To sync up with the `--enable-code-coverage` `./configure` option.

Ref: https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html
Ref: https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html
Ref: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html

Closes #18468

2 months agoautotools: make `--enable-code-coverage` support llvm/clang
Viktor Szakats [Wed, 3 Sep 2025 14:48:49 +0000 (16:48 +0200)] 
autotools: make `--enable-code-coverage` support llvm/clang

Cherry-picked from #18468

Closes #18473

2 months agowindows: replace `_beginthreadex()` with `CreateThread()`
Viktor Szakats [Fri, 1 Aug 2025 19:09:52 +0000 (21:09 +0200)] 
windows: replace `_beginthreadex()` with `CreateThread()`

Replace `_beginthreadex()` C runtime calls with native win32 API
`CreateThread()`. The latter was already used in `src/tool_doswin.c`
and in UWP and Windows CE builds before this patch. After this patch
all Windows flavors use it. To drop PP logic and simplify code.

While working on this it turned out that `src/tool_doswin.c` calls
`TerminateThread()`, which isn't recommended by the documentation,
except for "the most extreme cases". This patch makes no attempt
to change that code.
Ref: 9a2663322c330ff11275abafd612e9c99407a94a #17572
Ref: https://learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminatethread

Also:
- use `WaitForSingleObjectEx()` on all desktop Windows.
  Ref: 4be80d5109a340973dc6ce0221ec5c5761587df0
  Ref: https://sourceforge.net/p/curl/feature-requests/82/
  Ref: https://learn.microsoft.com/windows/win32/api/synchapi/nf-synchapi-waitforsingleobjectex
- tests: drop redundant casts.
- lib3207: fix to not rely on thread macros when building without thread
  support.

Assisted-by: Jay Satiro
Assisted-by: Marcel Raad
Assisted-by: Michał Petryka
Follow-up to 38029101e2d78ba125732b3bab6ec267b80a0e72 #11625

Closes #18451

2 months agobuild: drop the winbuild build system
Viktor Szakats [Sun, 27 Jul 2025 11:50:03 +0000 (13:50 +0200)] 
build: drop the winbuild build system

In favor of CMake.

Closes #18040

2 months agobase64: accept zero length argument to base64_encode
Daniel Stenberg [Fri, 19 Sep 2025 11:47:16 +0000 (13:47 +0200)] 
base64: accept zero length argument to base64_encode

We used to treat 0 as "call strlen() to get the length" for
curlx_base64_encode, but it turns out this is rather fragile as we
easily do the mistake of passing in zero when the data is actually not
there and then calling strlen() is wrong.

Force the caller to pass in the correct size. A zero length input string
now returns a zero length output and a NULL pointer.

Closes #18617

2 months agogtls: avoid potential use of uninitialized variable in trace output
Daniel Stenberg [Fri, 19 Sep 2025 12:59:17 +0000 (14:59 +0200)] 
gtls: avoid potential use of uninitialized variable in trace output

Reported in Joshua's sarif data

Closes #18620

2 months agotool_getparam/set_rate: skip the multiplication on overflow
Daniel Stenberg [Fri, 19 Sep 2025 15:36:29 +0000 (17:36 +0200)] 
tool_getparam/set_rate: skip the multiplication on overflow

The code detected the problem but didn't avoid the calculation
correctly.

Fixes #18624
Reported-by: BobodevMm on github
Closes #18625

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 19 Sep 2025 14:47:01 +0000 (16:47 +0200)] 
RELEASE-NOTES: synced

and bump to 8.17.0

2 months agocookie: avoid saving a cookie file if no transfer was done
Daniel Stenberg [Fri, 19 Sep 2025 13:59:57 +0000 (15:59 +0200)] 
cookie: avoid saving a cookie file if no transfer was done

Because parts of the cookie loading happens on transfer start the
in-memory cookie jar risks being incomplete and then a save might
wrongly truncate the target file.

Added test 1902 to verify.

Reported-by: divinity76 on github
Fixes #18621
Closes #18622

2 months agotelnet: make printsub require another byte input
Daniel Stenberg [Fri, 19 Sep 2025 12:19:26 +0000 (14:19 +0200)] 
telnet: make printsub require another byte input

Reported in Joshua's sarif data

Closes #18618

2 months agocf_socket_recv: don't count reading zero bytes as first byte
Daniel Stenberg [Fri, 19 Sep 2025 11:23:14 +0000 (13:23 +0200)] 
cf_socket_recv: don't count reading zero bytes as first byte

Reported in Joshua's sarif data

Closes #18615

2 months agolibssh: react on errors from ssh_scp_read
Daniel Stenberg [Fri, 19 Sep 2025 11:35:23 +0000 (13:35 +0200)] 
libssh: react on errors from ssh_scp_read

Reported in Joshua's sarif data

Closes #18616

2 months agoGHA: tidy up actions/checkout version in comments [ci skip]
Viktor Szakats [Fri, 19 Sep 2025 12:20:14 +0000 (14:20 +0200)] 
GHA: tidy up actions/checkout version in comments [ci skip]

2 months agoGHA/codeql: try disabling the TRAP cache
Viktor Szakats [Fri, 19 Sep 2025 08:19:29 +0000 (10:19 +0200)] 
GHA/codeql: try disabling the TRAP cache

The `cpp` CodeQL job is adding a cache entry for each run on the master
branch. One for Linux, another for Windows. Size: 68MB + 180MB = 248MB.
In one week we got 50+ such entries, almost filling the available cache
space.

Following the recommendation in an open issue thread, this patch tries
to disable this cache. Since it only affects master, the effect can only
be verified after merging.

The latest cache is picked up in PRs. The performance impact is also to
be seen after merge.

Bug: https://github.com/curl/curl/pull/18528#issuecomment-3288950880
Ref: https://github.com/github/codeql-action/pull/1172
Ref: https://github.com/github/codeql-action/issues/2030
Ref: https://github.com/github/codeql-action/issues/2885#issuecomment-2879069087

Follow-up to cc50f05370981e4933504e8aaec6b15880ff847f #18528

Closes #18613

2 months agolibssh2: drop two redundant null-terminations
Viktor Szakats [Thu, 18 Sep 2025 21:25:28 +0000 (23:25 +0200)] 
libssh2: drop two redundant null-terminations

The null-termination was first added in the initial SFTP commit in 2006:
a634f644005cbe2b3dea2b84328d605ec3474054

At that time this was a reasonable concern because libssh2 started
null-terminating this string just one year prior, in 2005:
https://github.com/libssh2/libssh2/commit/efc3841fd2c2c945e96492e9089e4d1810709d53

This fix was released in libssh2 v0.13 (2006-03-02).

curl requires libssh2 v1.2.8, making this workaround no longer necessary.

Follow-up to 9f18cb6544bbf47e2e2fad6564bc03098273c7bc #18598

Closes #18606

2 months agotool_operate: keep the progress meter for --out-null
Daniel Stenberg [Fri, 19 Sep 2025 06:47:15 +0000 (08:47 +0200)] 
tool_operate: keep the progress meter for --out-null

Fixes #18607
Closes #18609

2 months agolibssh2: error check and null-terminate in ssh_state_sftp_readdir_link()
Viktor Szakats [Thu, 18 Sep 2025 12:02:51 +0000 (14:02 +0200)] 
libssh2: error check and null-terminate in ssh_state_sftp_readdir_link()

- null-terminate the result to match the other getter
  `libssh2_sftp_symlink_ex()` call.

- check negative result and bail out early.

Reported-by: Joshua Rogers
Closes #18598

2 months agoGHA/codeql: make it run on docs updates, to verify examples
Viktor Szakats [Thu, 18 Sep 2025 18:26:15 +0000 (20:26 +0200)] 
GHA/codeql: make it run on docs updates, to verify examples

Follow-up to b4922b1295333dc6679eb1d588ddc2fb6b7fd5b7 #18564

2 months agoexamples: fix two issues found by CodeQL
Viktor Szakats [Thu, 18 Sep 2025 16:50:09 +0000 (18:50 +0200)] 
examples: fix two issues found by CodeQL

- http2-upload: use `fstat()` to query file length to fix TOCTOU.

- ftpuploadresume: fix checking `sscanf()` return value.

Follow-up to b4922b1295333dc6679eb1d588ddc2fb6b7fd5b7 #18564
Closes #18605

2 months agotool_operate: Improve wording in retry message
Jay Satiro [Thu, 18 Sep 2025 15:38:20 +0000 (11:38 -0400)] 
tool_operate: Improve wording in retry message

- Use the plural 'seconds' for anything other than exactly 1 second.

Before: Will retry in 1.250 second.
After: Will retry in 1.250 seconds.

Follow-up to ca034e83.

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

2 months agotftp: check and act on tftp_set_timeouts() returning error
Daniel Stenberg [Thu, 18 Sep 2025 15:32:39 +0000 (17:32 +0200)] 
tftp: check and act on tftp_set_timeouts() returning error

Reported-by: Joshua Rogers
Ref: https://github.com/curl/curl/pull/18574#issuecomment-3300183302
Closes #18603

2 months agotftp: propagate expired timer from tftp_state_timeout()
Joshua Rogers [Tue, 16 Sep 2025 19:52:28 +0000 (00:52 +0500)] 
tftp: propagate expired timer from tftp_state_timeout()

When Curl_timeleft() < 0 we used to return 0, masking the expiry and
skipping the caller’s (timeout_ms < 0) path. Now we set FIN and return
the negative value so tftp_multi_statemach() aborts with
CURLE_OPERATION_TIMEDOUT as intended.

Closes #18574

2 months agosocks_sspi: Fix some memory cleanup calls
Jay Satiro [Thu, 18 Sep 2025 06:07:17 +0000 (02:07 -0400)] 
socks_sspi: Fix some memory cleanup calls

- Ensure memory allocated by malloc() is freed by free().

Prior to this change SSPI's FreeContextBuffer() was sometimes used to
free malloc'd memory. I can only assume the reason we have no crash
reports about this is because the underlying heap free is probably the
same for both.

Reported-by: Joshua Rogers
Fixes https://github.com/curl/curl/issues/18587
Closes https://github.com/curl/curl/pull/18594

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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