Commit Graph

31012 Commits

Author SHA1 Message Date
Viktor Szakats
38029101e2
mingw: delete support for legacy mingw.org toolchain
Drop support for "old" / "legacy" / "classic" / "v1" / "mingw32" MinGW:
  https://en.wikipedia.org/wiki/MinGW, https://osdn.net/projects/mingw/
Its homepage used to be http://mingw.org/ [no HTTPS], and broken now.
It supported the x86 CPU only and used a old Windows API header and
implib set, often causing issues. It also misses most modern Windows
features, offering old versions of both binutils and gcc (no llvm/clang
support). It was last updated 2 years ago.

curl now relies on toolchains based on the mingw-w64 project:
https://www.mingw-w64.org/  https://sourceforge.net/projects/mingw-w64/
https://www.msys2.org/  https://github.com/msys2/msys2
https://github.com/mstorsjo/llvm-mingw
(Also available via Linux and macOS package managers.)

Closes #11625
2023-09-23 09:12:57 +00:00
Mark Gaiser
65b563a96a
curl: add support for the IPFS protocols:
- ipfs://<cid>
- ipns://<cid>

This allows you tu use ipfs in curl like:
curl ipfs://<cid>
and
curl ipns://<cid>

For more information consult the readme at:
https://curl.se/docs/ipfs.html

Closes #8805
2023-09-23 11:02:10 +02:00
Daniel Stenberg
5595e33617
bufq: remove Curl_bufq_skip_and_shift (unused)
Closes #11915
2023-09-23 10:50:10 +02:00
Daniel Stenberg
5627033344
scripts/singleuse.pl: add curl_global_trace 2023-09-22 14:13:00 +02:00
Viktor Szakats
48ba5d9007
cmake: fix unity symbol collisions in h2 builds
Regression from 331b89a319

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #11912
2023-09-22 09:19:10 +00:00
Daniel Stenberg
71c3d0ffd5
RELEASE-NOTES: synced 2023-09-22 10:36:31 +02:00
Dan Fandrich
ddc180fdc9 github/labeler: improve the match patterns
This includes new rules for setting the appleOS and logging labels and
matches on some example files. Also, enable dot mode for wildcard
matches in the .github directory.
2023-09-21 14:37:27 -07:00
Daniel Stenberg
6bc7191438
upload-file.d: describe the file name slash/backslash handling
Closes #11911
2023-09-21 23:07:35 +02:00
Jakub Jelen
35eb2614d8
libssh: cap SFTP packet size sent
Due to libssh limitations

Signed-off-by: Jakub Jelen <jjelen@redhat.com>

Closes #11804
2023-09-21 16:53:30 +02:00
Daniel Stenberg
cb5ca39874
curl.h: mark CURLSSLBACKEND_NSS as deprecated since 8.3.0
Closes #11905
2023-09-21 14:19:56 +02:00
Daniel Stenberg
bc5502a7be
mailmap: unify Michael Osipov under a single email 2023-09-21 14:18:49 +02:00
Ted Lyngmo
c1ab33ed79
docs: use CURLSSLBACKEND_NONE
[ssl] use CURLSSLBACKEND_NONE instead of (curl_sslbackend)-1 in
documentation and examples.

Signed-off-by: Ted Lyngmo <ted@lyncon.se>

Closes #11909
2023-09-21 14:15:03 +02:00
Dan Fandrich
b2b0534e76 github/labeler: give the sync-labels config item a default value
This shouldn't be necessary and is likely a bug with this beta version
of the labeller.

Also, fix the negative matches for the documentation label.

Follow-up to dd12b452a
Closes #11907
2023-09-21 01:23:41 -07:00
Dan Fandrich
32dcda98e7 github/labeler: fix up more the labeler config format
The new version didn't like the workaround we had for a bug in the
previous labeler version, and it should no longer be needed.

Follow-up to dd12b452a
Closes #11906
2023-09-21 01:10:44 -07:00
Dan Fandrich
23283dac5d github/labeler: fix indenting to try to appease labeller
Follow-up to dd12b452a
2023-09-21 00:05:02 -07:00
Jay Satiro
80fc040e45 libssh2: fix error message on failed pubkey-from-file
- If libssh2_userauth_publickey_fromfile_ex returns -1 then show error
  message "SSH public key authentication failed: Reason unknown (-1)".

When libssh2_userauth_publickey_fromfile_ex returns -1 it does so as a
generic error and therefore doesn't set an error message. AFAICT that is
not documented behavior.

Prior to this change libcurl retrieved the last set error message which
would be from a previous function failing. That resulted in misleading
auth failed error messages in verbose mode.

Bug: https://github.com/curl/curl/issues/11837#issue-1891827355
Reported-by: consulion@users.noreply.github.com

Closes https://github.com/curl/curl/pull/11881
2023-09-21 02:59:21 -04:00
Stefan Eissing
3d53f211e5
pytest: exclude test_03_goaway in CI runs due to timing dependency
Closes #11860
2023-09-21 08:57:57 +02:00
Stefan Eissing
8898257446
lib: disambiguate Curl_client_write flag semantics
- use CLIENTWRITE_BODY *only* when data is actually body data
- add CLIENTWRITE_INFO for meta data that is *not* a HEADER
- debug assertions that BODY/INFO/HEADER is not used mixed
- move `data->set.include_header` check into Curl_client_write
  so protocol handlers no longer have to care
- add special in FTP for `data->set.include_header` for historic,
  backward compatible reasons
- move unpausing of client writes from easy.c to sendf.c, so that
  code is in one place and can forward flags correctly

Closes #11885
2023-09-21 08:56:50 +02:00
Patrick Monnerat
bbac7c19e5
tftpd: always use curl's own tftp.h
Using the system's provided arpa/tftp.h and optimizing, GCC 12 detects
and reports a stringop-overread warning:

tftpd.c: In function ‘write_behind.isra’:
tftpd.c:485:12: warning: ‘write’ reading between 1 and 2147483647 bytes from a region of size 0 [-Wstringop-overread]
  485 |     return write(test->ofile, writebuf, count);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tftpd.c:71:
/usr/include/arpa/tftp.h:58:30: note: source object ‘tu_data’ of size 0
   58 |                         char tu_data[0];        /* data or error string */
      |                              ^~~~~~~

This occurs because writebuf points to this field and the latter
cannot be considered as being of dynamic length because it is not
the last field in the structure. Thus it is bound to its declared
size.

This commit always uses curl's own version of tftp.h where the
target field is last in its structure, effectively avoiding the
warning.

As HAVE_ARPA_TFTP_H is not used anymore, cmake/configure checks for
arpa/tftp.h are removed.

Closes #11897
2023-09-21 08:47:07 +02:00
Dan Fandrich
d6d458b1cf test1474: make precheck more robust on non-Solaris systems
If uname -r returns something odd, perl could return an error code and
the test would be erroneously skipped. The qx// syntax avoid this.

Followup to 08f9b2148
2023-09-20 14:26:32 -07:00
Dan Fandrich
dd12b452a8 github/labeler: switch to the 5 beta version
This version adds an important feature that will allow more PRs to be
labelled. Rather than being limited to labeling PRs with files that
match a single glob, it can now label them if multiple changed files
match any one of a number of globs.
2023-09-20 12:42:07 -07:00
Daniel Stenberg
ff5e502316
lib: enable hmac for digest as well
Previously a build that disabled NTLM and aws-sigv4 would fail to build
since the hmac was disabled, but it is also needed for digest auth.

Follow-up to e92edfbef6

Fixes #11890
Reported-by: Aleksander Mazur
Closes #11896
2023-09-20 13:38:42 +02:00
Daniel Stenberg
7cf269dd1c
idn: if idn2_check_version returns NULL, return error
... this avoids a NULL dereference for this unusual case.

Reported-by: s0urc3_ on hackerone
Closes #11898
2023-09-20 13:36:51 +02:00
Daniel Stenberg
0d3956b8c6
http: fix CURL_DISABLE_BEARER_AUTH breakage
When bearer auth was disabled, the if/else logic got wrong and caused
problems.

Follow-up to e92edfbef6
Fixes #11892
Reported-by: Aleksander Mazur
Closes #11895
2023-09-20 13:33:31 +02:00
Michael Osipov
452182332d
wolfssl: allow capath with CURLOPT_CAINFO_BLOB
Remain consistent with OpenSSL. While CAfile is nulled as documented
with CURLOPT_CAINFO_BLOB, CApath remains intact.

Closes #11886
2023-09-20 13:30:41 +02:00
Michael Osipov
cc123e2757
wolfssl: use ssl_cafile/ssl_capath variables consistent with openssl.c
Closes #11886
2023-09-20 13:30:34 +02:00
Dan Fandrich
08f9b21483 test1474: disable test on NetBSD, OpenBSD and Solaris 10
These kernels only send a fraction of the requested amount of the first
large block, invalidating the assumptions of the test and causing it to
fail.

Assisted-by: Christian Weisgerber
Ref: https://curl.se/mail/lib-2023-09/0021.html
Closes #11888
2023-09-19 23:49:08 -07:00
Ryan Schmidt
6ab7e1990b
cmake, configure: also link with CoreServices
When linking with CoreFoundation, also link with CoreServices which is
apparently required to avoid an NSInvalidArgumentException in software
linking with libcurl on macOS Sonoma 14 and later.

Fixes #11893
Closes #11894
2023-09-20 08:38:19 +02:00
Marc Hoersken
c6dc25f111
CI/azure: remove pip, wheel, cryptography, pyopenssl and impacket
These dependencies are now already included in the Docker image.

Ref: 2607a31bca

Closes #11889
2023-09-19 22:13:11 +02:00
Daniel Stenberg
8420fef590
wolfssl: if CURLOPT_CAINFO_BLOB is set, ignore the CA files
Ref: #11883
Reported-by: Michael Osipov
Closes #11884
2023-09-19 12:59:56 +02:00
Daniel Stenberg
becd1e86a8
RELEASE-NOTES: synced 2023-09-19 08:32:38 +02:00
Daniel Stenberg
a878864a48
test3103: CURLOPT_COOKIELIST test 2023-09-19 08:26:14 +02:00
Daniel Stenberg
73c82ed941
cookie: set ->running in cookie_init even if data is NULL
This is a regression introduced in b1b326ec50 (shipped in curl 8.1.0)

Test 3103 verifies.

Fixes #11875
Reported-by: wangp on github
Closes #11876
2023-09-19 08:26:07 +02:00
Daniel Stenberg
7f225456d1
test498: total header size for all redirects is larger than accepted 2023-09-18 22:57:04 +02:00
Daniel Stenberg
2cb0d346aa
http: use per-request counter to check too large headers
Not the counter that accumulates all headers over all redirects.

Follow-up to 3ee79c1674

Do a second check for 20 times the limit for the accumulated size for
all headers.

Fixes #11871
Reported-by: Joshix-1 on github
Closes #11872
2023-09-18 22:57:01 +02:00
Jay Satiro
68ee7f8b7e THANKS: add Eric Murphy
He reported #11850 (quiche build error) but I forgot to add a
'reported-by' entry in the fix 267e14f1.
2023-09-18 14:38:43 -04:00
Daniel Stenberg
f6e5435cef h2-proxy: remove left-over mistake in drain_tunnel()
Left-over from 331b89a319

Reported-by: 南宫雪珊

Closes https://github.com/curl/curl/pull/11877
2023-09-18 14:30:20 -04:00
vvb2060
746dbc1488
lib: failf/infof compiler warnings
Closes #11874
2023-09-18 09:56:25 +02:00
Daniel Stenberg
706eff9f1f
rand: fix 'alnum': array is too small to include a terminating null character
It was that small on purpose, but this change now adds the null byte to
avoid the error.

Follow-up to 3aa3cc9b05

Reported-by: Dan Fandrich
Ref: #11838
Closes #11870
2023-09-17 17:43:52 +02:00
Mathias Fuchs
adbb7a030d
cmake: fix the help text to the static build option in CMakeLists.txt
Closes #11843
2023-09-16 23:38:36 +02:00
John Haugabook
9764bfc368
MANUAL.md: change domain to example.com
Closes #11866
2023-09-16 23:36:45 +02:00
Daniel Stenberg
f8cee8cc31
doh: inherit DEBUGFUNCTION/DATA
When creating new transfers for doing DoH, they now inherit the debug
settings from the initiating transfer, so that the application can
redirect and handle the verbose output correctly even for the DoH
transfers.

Reported-by: calvin2021y on github
Fixes #11864
Closes #11869
2023-09-16 18:27:38 +02:00
Dan Fandrich
c879203538 http_aws_sigv4: fix sorting with empty parts
When comparing with an empty part, the non-empty one is always
considered greater-than. Previously, the two would be considered equal
which would randomly place empty parts amongst non-empty ones. This
showed as a test 439 failure on Solaris as it uses a different
implementation of qsort() that compares parts differently.

Fixes #11855
Closes #11868
2023-09-16 08:35:16 -07:00
Dan Fandrich
589dca761c CI: ignore the "flaky" and "timing-dependent" test results
CI builds will now run these tests, but will ignore the results if they
fail. The relevant tests are ones that are sensitive to timing or
have edge conditions that make them more likely to fail on CI servers,
which are often heavily overloaded and slow.

This change only adds two additional tests to be ignored, since the
others already had the flaky keyword.

Closes #11865
2023-09-16 08:33:59 -07:00
Dan Fandrich
989e1f35e8 runtests: eliminate a warning on old perl versions
The warning "Use of implicit split to @_ is deprecated" showed between
perl versions about 5.8 through 5.11.
2023-09-16 08:33:45 -07:00
Dan Fandrich
06cdfad49f tests: log the test result code after each libtest
This makes it easier to determine the test status. Also, capitalize
FAILURE and ABORT messages in log lines to make them easier to spot.
2023-09-16 08:33:45 -07:00
Harry Sintonen
3aa3cc9b05
misc: better random strings
Generate alphanumerical random strings.

Prior this change curl used to create random hex strings. This was
mostly okay, but having alphanumerical random strings is better: The
strings have more entropy in the same space.

The MIME multipart boundary used to be mere 64-bits of randomness due
to being 16 hex chars. With these changes the boundary is 22
alphanumerical chars, or little over 130 bits of randomness.

Closes #11838
2023-09-16 11:37:57 +02:00
Daniel Stenberg
f88cc654ec
cookie: reduce variable scope, add const 2023-09-15 22:09:43 +02:00
Daniel Stenberg
8c285a76ee
cookie: do not store the expire or max-age strings
Convert it to an expire time at once and save memory.

Closes #11862
2023-09-15 22:09:39 +02:00
Daniel Stenberg
61275672b4
cookie: remove unnecessary struct fields
Plus: reduce the hash table size from 256 to 63. It seems unlikely to
make much of a speed difference for most use cases but saves 1.5KB of
data per instance.

Closes #11862
2023-09-15 22:09:06 +02:00