Commit graph

38453 commits

Author SHA1 Message Date
Viktor Szakats
a06fd64974
unit1658: rename CURLcode to result
Closes #21356
2026-04-17 13:34:44 +02:00
Viktor Szakats
1701a8319e
GHA: bump required test minimums
Ref: https://testclutch.curl.se/static/reports/feature-matrix.html

Closes #21353
2026-04-17 13:10:43 +02:00
Viktor Szakats
5e45e82bc9
lib506: rename CURLcode variable to result
Closes #21352
2026-04-17 12:09:14 +02:00
Viktor Szakats
b515a71356
unit1675: fix -Wformat-signedness
Closes #21351
2026-04-17 12:09:14 +02:00
Stefan Eissing
70281e39be
haproxy: use correct ip version on client supplied address
When a user supplies an IP address to use for the HAPROXY protocol,
the IP version reported must be deduced from the address and has
no relation to the IP version used for the upstream connection.

Add test3220 to verify.

Fixes #21340
Reported-by: Fiona Klute
Closes #21341
2026-04-17 10:01:49 +02:00
Viktor Szakats
021a87cf81
vtls_scache: rename CURLcode variable to result
Closes #21346
2026-04-16 22:57:17 +02:00
Daniel Stenberg
bb771cec34
RELEASE-NOTES: synced 2026-04-16 22:56:46 +02:00
Stefan Eissing
a973377cd7
dnsd: implement HTTPS-RR with alpn pref and no-default-alpn
Support HTTPS records in dnsd that have ALPN preferences.

Add pytest test_22_* to verify that HTTPS record ALPN
preferencces take effect if the HTTPS resolve arrives in time.

Fix HTTPS eyeballing use of timeouts for second attempt. Also,
make an initial HTTP/1.1 attempt switch off HTTP/2.

Closes #21329
2026-04-16 22:53:20 +02:00
Stefan Eissing
1bf1f8ed6a
pytest_05_09: increase reliability
Test has been flaky due to not waiting for the test server to be
listening. On slow CI systems, the started thread is late and the curl
command gets a refused connection.

Closes #21337
2026-04-16 22:52:13 +02:00
Daniel Stenberg
885b553545
lib: rename more CURLcode variables to 'result'
Closes #21348
2026-04-16 22:50:52 +02:00
Daniel Stenberg
b4024bf808
http: clear credentials better on redirect
Verify with test 2506: netrc with redirect using proxy

Updated test 998 which was wrong.

Reported-by: Muhamad Arga Reksapati

Closes #21345
2026-04-16 21:51:41 +02:00
Viktor Szakats
3e0e2cc1ab
GHA: drop 3rd-party apt source docker.list
Seen on `ubuntu-slim` runners.

Also:
- extend to two jobs to `ls -l` package sources on both ubuntu-latest,
  ubuntu-24.04-arm, and ubuntu-slim.
- drop former stray apt source `ondrej-ubuntu-php-noble.sources`.
  It's no longer present on the image.

Closes #21344
2026-04-16 15:37:13 +02:00
renovate[bot]
0a6f815ff7
GHA/http3-linux: update dependency ngtcp2/ngtcp2 to v1.22.1
Closes #21343
2026-04-16 15:08:16 +02:00
Stefan Eissing
32a513e180
urlapi: same origin tests
Add new internal `curl_url_same_origin()` to check if a href has the
same origin as a base URL. Add test cases in test1675 and use this in
http2 push handling.

Closes #21328
2026-04-16 15:00:43 +02:00
Viktor Szakats
ce7174555d
build: adjust/add casts to fix -Wformat-signedness
Also adjust a mask in `mqttd.c`.

Follow-up to 548c16a824 #21335
Cherry-picked from #20848

Closes #21339
2026-04-16 11:38:14 +02:00
Daniel Stenberg
7e450cb80a
libssh2: allocate libssh2-friendly memory in kbd_callback
The function libssh2_userauth_keyboard_interactive_ex() calls the
callback and is documented to call free() on the memory returned to
libssh2 from the callback. libcurl can therefore not use the regular
curlx_strdup() for this, as that is not compatible in debug builds or
when curl_global_init_mem() is used.

Fixes #21336
Closes #21338
2026-04-16 10:35:32 +02:00
Viktor Szakats
548c16a824
build: fix -Wformat-signedness by adjusting printf masks
- sync printf masks with the passed value.
- fix a couple of casts.

Cherry-picked from #20848

Closes #21335
2026-04-16 10:32:50 +02:00
Daniel McCarney
54cc65595d
ci: update RUSTLS_VERSION 0.15.1 -> 0.15.2
Closes #21333
2026-04-15 23:34:33 +02:00
Daniel Stenberg
7fd35f4c34
unittests: cleanups
- make sure all UNITTEST prototypes mark in which unit test they are used,
  with "@unittest" markup

- make sure all UNITTEST functions do not use Curl_ prefix, as that is a
  prefix we use for global private functions and these functions are static
  and therefore not global and the prefix is wrong

- drop UNITTEST for functions not used in unit tests

- make the extract-unit-protos script highlight the above issues if found

- extract-unit-protos now also outputs the unit test number for all the
  generated protos in lib/unitprotos.h to aid readers. It also adds the source
  file and line number where the proto originates from.

- extract-unit-protos now exits with a non-zero value if any of the above
  warnings are triggered

- cf-dns: Curl_cf_dns_result => static cf_dns_result
- hostip: Curl_ipv6works => static ipv6works
- url: remove Curl_setup_conn() - not used anymore
- connect: Curl_timeleft_now_ms => UNITTEST timeleft_now_ms

Closes #21330
2026-04-15 23:32:38 +02:00
Viktor Szakats
94f14c54b0
renovate: use standard bump formula for OpenSSL
Cherry-picked from #21317

Closes #21323
2026-04-15 10:17:33 +02:00
Viktor Szakats
ce2f65c415
pytest: fix dnsd pid filename
Spotted by GitHub Code Quality

Follow-up to a5542c23e7 #21289

Closes #21321
2026-04-15 10:17:33 +02:00
Daniel Stenberg
fa057ea3de
transfer: clear the old autoreferer
Verify in test 2505

Closes #21322
2026-04-15 10:15:25 +02:00
Daniel Stenberg
c60d90cd65
urlapi: make parse_file() return zero data on error
This fixes the torture failures in 1675

Also, make it allocate the scheme *after* the path has been verified, so
that it is avoided in the common error cases.

Fixes #21326
Closes #21324
2026-04-15 10:14:09 +02:00
Viktor Szakats
36295347bc
GHA/linux: tidy up and extend address-sanitizer job options
Also tried `integer` which has hits, but too slow to be practical to run on
every commit.

Closes #20785
2026-04-14 23:39:42 +02:00
Viktor Szakats
880cd0c34b
GHA/non-native: bump cross-platform-actions to 1.0.0
Closes #21320
2026-04-14 23:30:55 +02:00
Viktor Szakats
2e5acc1b15
GHA/linux: rename mbedtls-prev env to align with Renovate
- rename version env to stay compatible with Renovate `matchStrings`.
- also switch to manual bumps.
  Bump rule was wrong, and deemed not worthy the complexity to fix.

Closes #21319
2026-04-14 18:54:23 +02:00
Viktor Szakats
7767b56862
GHA/http3-linux: bump OpenSSL 4 beta to final
Closes #21318
2026-04-14 18:54:23 +02:00
Daniel Stenberg
3a19987a87
urldata: move cookiehost to struct SingleRequest
To make it scoped for the single request appropriately.

Reported-by: Muhamad Arga Reksapati

Verify with libtest 2504: a custom Host *disabled* on reused handle

Closes #21312
2026-04-14 16:59:11 +02:00
Stefan Eissing
86f1e5b3f6
test dnsd: implement delayed responses
Add "Delay-A: ms", "Delay-AAAA: ms" and "Delay-HTTPS: ms" to the test
dnsd config and implement delayed response handling.

Add test_21_09 and test_21_10 to check that delayed responses connect
using the undelayed address family.

Closes #21299
2026-04-14 16:49:07 +02:00
Stefan Eissing
bcd94e2750
socks: use dns filter for resolving
Use a dns connection filter to resolve hostnames where their addresses
are locally resolved and forwarded to the SOCKS proxy.

This makes all improvements, like in #21295 for example, also apply
to socks connections. Curl_resolv() is now only called from a DNS
filter.

(ftp still calls Curl_resolv_blocking() in two places, one of which
 may be replaceable with a DNS filter as well to remove the block, tbd)

Closes #21297
2026-04-14 16:48:20 +02:00
Daniel Stenberg
0567e72168
tests: use %b64[] instead of "raw" base64
Closes #21313
2026-04-14 16:18:14 +02:00
Daniel Stenberg
188c2f166a
http: clear the proxy credentials as well on port or scheme change
Add tests 2009-2011 to verify switching between proxies with credentials
when the switch is driven by a redirect

Reported-by: Dwij Mehta

Closes #21304
2026-04-14 16:14:51 +02:00
Daniel Stenberg
9ceb3ff46a
urlapi: stop extracting hostname from file:// URLs on Windows
There is no reason we should treat this part different on Windows. Noe
anything except blank, localhost or 127.0.0.1 cause error there as well.

Also: fix query handling in urlencode_str

Closes #21296
2026-04-14 12:09:48 +02:00
Daniel Stenberg
0b4ebebb06
test1675: unit tests for URL API helper functions
- ipv4_normalize
- urlencode_str
- ipv6_parse
- parse_file

urlapi: make the string URL encoder normalize to uppercase
percent-encoding

Closes #21296
2026-04-14 12:09:38 +02:00
Daniel Stenberg
d7a991cc9b
lib1560: fix comment typo 2026-04-14 12:09:04 +02:00
Daniel Stenberg
99ead4e0f0
request: cleanup the auth headers on soft rest as well
To avoid the risk them lingering around.

Follow-up to 3512b673dd

Closes #21311
2026-04-14 11:24:21 +02:00
renovate[bot]
67795ff730
GHA: update dependency google/boringssl to v0.20260413.0
Closes #21310
2026-04-14 11:04:10 +02:00
Daniel Stenberg
def4d8986e
http: use header_has_value() instead of duplicate code
Closes #21302
2026-04-14 10:16:43 +02:00
dependabot[bot]
bcb02fe526
GHA: bump pytest from 9.0.2 to 9.0.3
CVE-2025-71176

Closes #21306
2026-04-14 02:27:15 +02:00
Viktor Szakats
7b787f5995
KNOWN_BUGS: Native CA roots incomplete on Windows with OpenSSL/fork
Reported-by: finkjsc on github
Reported-by: nitrogene on github
Ref: #12303
Closes #20897

Closes #21305
2026-04-14 02:20:16 +02:00
Viktor Szakats
df6014894b
clang-tidy: enable more checks, fix fallouts
- enable three checks:
  - bugprone-invalid-enum-default-initialization
  - bugprone-sizeof-expression
  - readability-inconsistent-declaration-parameter-name (strict)
- fix remaining discrepancies with arg names in prototypes
  and implementation, in strict mode.
- document reason for some checks tested but not enabled.

Closes #20794
2026-04-14 02:20:16 +02:00
Viktor Szakats
e0dd6eb4a4
tidy-up: miscellaneous
- examples: sync debug output printf masks.
- INSTALL-CMAKE.md: tidy up section for some options.
- curl_sha512_256: delete comment suggesting an optimization.
- vtls/keylog: scope a variable.
- vtls/openssl: make a source code URL a permalink.
- vtls/schannel: drop redundant parentheses.
- test1119.pl: robustify `$1` -> `$s`.
- sync arg names in comments to match the code.
- tidy up and minor fixes to comments.
- fix formatting/indenting/comment/newline/include nits.
- move `UNITTEST` protos next to definitions, sync their argument names.
- make variables static.
- add parentheses to Perl `open()` calls.
- drop unnecessary double quotes in Perl.
- clang-format.

Closes #21000
2026-04-14 01:08:32 +02:00
Daniel Stenberg
3512b673dd
lib: move request specific allocations to the request struct
To make it clearer that they are ephemeral.

Closes #21301
2026-04-13 23:23:34 +02:00
Daniel Stenberg
7a349b5eed
setopt: fix typos in comments
Closes #21303
2026-04-13 23:12:05 +02:00
Daniel Stenberg
9ded494f0e
test1560: add a few more URL API test variations
Closes #21294
2026-04-13 21:58:55 +02:00
Stefan Eissing
40d57c9f58
hostip: resolve user supplied ip addresses
When a user supplied an ip address in a URL as hostname, use that even
when address family restrictions like -4 or -6 are set.

Add test_10_15/16 to verify with a local proxy server.

Fixes #21146
Reported-by: Terrance Wong

How:
- cf-dns: on see the hostname is an ip(v6) address, add the respective
  A/AAAA to the dns query bits
- cf-dns/hostip: only hand out addrinfos for a family if that family
  is part of the DNS queries. That prevents for example ipv6 addresses
  to show up from dns cache entries
- change cf-ip-happy to no longer check for "ip_version" and instead
  use all addresses that cf-dns hands out

Closes #21295
2026-04-13 19:52:30 +02:00
Daniel Stenberg
ec445fc595
setopt: move CURLOPT_CURLU
To fix cast from 'char *' to 'CURLU *' (aka 'struct Curl_URL *')
increases required alignment from 1 to 8

Follow-up to 3407bee8c8

Closes #21298
2026-04-13 14:34:16 +02:00
Jay Satiro
70bb0db767 schannel: increase renegotiation timeout to 60 seconds
Prior to this change the timeout was 7 seconds but that is too short for
enhanced-security users that have to fill out an interactive prompt on
Schannel renegotiation (PIN, smart card, etc).

Reported-by: Tim Omta

Fixes https://github.com/curl/curl/issues/21270
Closes https://github.com/curl/curl/pull/21291
2026-04-13 02:12:16 -04:00
Daniel Stenberg
3b68c67be2
RELEASE-NOTES: synced 2026-04-13 08:08:19 +02:00
Stefan Eissing
afdd8f1290
http: fix auth_used and auth_avail
Fix http auth to set the `picked` auth when sending the corresponding
headers. Fix reporting Digest as avail.

Fixes #21274
Reported-by: sergio-nsk on github
Closes #21284
2026-04-11 17:33:03 +02:00