]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agotiny-curl: 7.79.1 release tiny-curl-7_79
Daniel Stenberg [Thu, 27 Aug 2020 07:42:11 +0000 (09:42 +0200)] 
tiny-curl: 7.79.1 release

3 years agotiny-curl: Micrium support
Daniel Stenberg [Fri, 14 Aug 2020 13:45:59 +0000 (15:45 +0200)] 
tiny-curl: Micrium support

3 years agotiny-curl: base and FreeRTOS support
Daniel Stenberg [Mon, 12 Apr 2021 06:52:24 +0000 (08:52 +0200)] 
tiny-curl: base and FreeRTOS support

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 28 Sep 2021 06:27:24 +0000 (08:27 +0200)] 
RELEASE-NOTES: synced

3 years agotool_cb_prg: make resumed upload progress bar show better
Daniel Stenberg [Mon, 27 Sep 2021 07:13:40 +0000 (09:13 +0200)] 
tool_cb_prg: make resumed upload progress bar show better

This is a regression that was *probably* injected in the larger progress
bar overhaul in 2018.

Reported-by: beslick5 on github
Fixes #7760
Closes #7777

3 years agogen.pl: insert the current date and version in generated man page
Daniel Stenberg [Mon, 27 Sep 2021 14:47:04 +0000 (16:47 +0200)] 
gen.pl: insert the current date and version in generated man page

Reported-by: Gisle Vanem
Ref: #7780
Closes #7782

3 years agoNTLM: use DES_set_key_unchecked with OpenSSL
Daniel Stenberg [Mon, 27 Sep 2021 14:08:39 +0000 (16:08 +0200)] 
NTLM: use DES_set_key_unchecked with OpenSSL

... as the previously used function DES_set_key() will in some cases
reject using a key that it deems "weak" which will cause curl to
continue using the unitialized buffer content as key instead.

Assisted-by: Harry Sintonen
Fixes #7779
Closes #7781

3 years agoCI: align make and test flags in various config files
Marc Hoersken [Mon, 27 Sep 2021 18:59:29 +0000 (20:59 +0200)] 
CI: align make and test flags in various config files

1. Use Makefile target to run tests in autotools builds on AppVeyor.
2. Disable testing of SCP protocol on native Windows environments.
3. Remove redundant parameters -a -p from target test-nonflaky.
4. Don't use -vc parameter which is reserved for debugging.

Replaces #7591
Closes #7690

3 years agomailmap: unify Max!
Daniel Stenberg [Mon, 27 Sep 2021 15:22:00 +0000 (17:22 +0200)] 
mailmap: unify Max!

3 years agoCURLOPT_PREREQFUNCTION: add new callback
Max Dymond [Thu, 22 Jul 2021 14:32:30 +0000 (15:32 +0100)] 
CURLOPT_PREREQFUNCTION: add new callback

Triggered before a request is made but after a connection is set up

Changes:

- callback: Update docs and callback for pre-request callback
- Add documentation for CURLOPT_PREREQDATA and CURLOPT_PREREQFUNCTION,
- Add redirect test and callback failure test
- Note that the function may be called multiple times on a redirection
- Disable new 2086 test due to Windows weirdness

Closes #7477

3 years agoKNOWN_BUGS: HTTP/2 connections through HTTPS proxy frequently stall
Daniel Stenberg [Mon, 27 Sep 2021 08:05:16 +0000 (10:05 +0200)] 
KNOWN_BUGS: HTTP/2 connections through HTTPS proxy frequently stall

Closes #6936

3 years agoTODO: make configure use --cache-file more and better
Daniel Stenberg [Mon, 27 Sep 2021 07:50:05 +0000 (09:50 +0200)] 
TODO: make configure use --cache-file more and better

Closes #7753

3 years agourlapi: support UNC paths in file: URLs on Windows
Sergey Markelov [Mon, 27 Sep 2021 06:31:52 +0000 (08:31 +0200)] 
urlapi: support UNC paths in file: URLs on Windows

- file://host.name/path/file.txt is a valid UNC path
  \\host.name\path\files.txt to a non-local file transformed into URI
  (RFC 8089 Appendix E.3)

- UNC paths on other OSs must be smb: URLs

Closes #7366

3 years agourlapi: add curl_url_strerror()
i-ky [Mon, 27 Sep 2021 06:22:54 +0000 (08:22 +0200)] 
urlapi: add curl_url_strerror()

Add curl_url_strerror() to convert CURLUcode into readable string and
facilitate easier troubleshooting in programs using URL API.
Extend CURLUcode with CURLU_LAST for iteration in unit tests.
Update man pages with a mention of new function.
Update example code and tests with new functionality where it fits.

Closes #7605

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 26 Sep 2021 21:44:51 +0000 (23:44 +0200)] 
RELEASE-NOTES: synced

3 years agolibssh2: add SHA256 fingerprint support
Mats Lindestam [Sun, 26 Sep 2021 21:20:53 +0000 (23:20 +0200)] 
libssh2: add SHA256 fingerprint support

Added support for SHA256 fingerprint in command line curl and in
libcurl.

Closes #7646

3 years agolibcurl.rc: switch out the copyright symbol for plain ASCII
Daniel Stenberg [Fri, 24 Sep 2021 21:31:58 +0000 (23:31 +0200)] 
libcurl.rc: switch out the copyright symbol for plain ASCII

Reported-by: Vitaly Varyvdin
Assisted-by: Viktor Szakats
Fixes #7765
Closes #7776

3 years agongtcp2: fix QUIC transport parameter version
Jun-ya Kato [Wed, 15 Sep 2021 13:38:24 +0000 (13:38 +0000)] 
ngtcp2: fix QUIC transport parameter version

fix inappropriate version setting for QUIC transport parameters.
this patch keeps curl with ngtcp2 uses QUIC draft version (h3-29).

Closes #7771

3 years agoexamples/imap-append: fix end-of-data check
Daniel Stenberg [Fri, 24 Sep 2021 21:23:11 +0000 (23:23 +0200)] 
examples/imap-append: fix end-of-data check

Reported-by: Alexander Chuykov
Fixes #7774
Closes #7775

3 years agovtls: Fix a memory leak if an SSL session cannot be added to the cache
Michael Kaufmann [Wed, 22 Sep 2021 10:04:25 +0000 (12:04 +0200)] 
vtls: Fix a memory leak if an SSL session cannot be added to the cache

On connection shutdown, a new TLS session ticket may arrive after the
SSL session cache has already been destructed. In this case, the new
SSL session cannot be added to the SSL session cache.

The callers of Curl_ssl_addsessionid() need to know whether the SSL
session has been added to the cache. If it has not been added, the
reference counter of the SSL session must not be incremented, or memory
used by the SSL session must be freed. This is now possible with the new
output parameter "added" of Curl_ssl_addsessionid().

Fixes #7683
Closes #7752

3 years agoHTTP3.md: use 'autoreconf -fi' instead of buildconf
Momoka Yamamoto [Sun, 19 Sep 2021 13:17:42 +0000 (22:17 +0900)] 
HTTP3.md: use 'autoreconf -fi' instead of buildconf

buildconf is not used since #5853

Closes #7746

3 years agoGIT-INFO: rephrase to adapt to s/buildconf/autoreconf
Daniel Stenberg [Fri, 24 Sep 2021 11:14:52 +0000 (13:14 +0200)] 
GIT-INFO: rephrase to adapt to s/buildconf/autoreconf

3 years agollist: remove redundant code, branch will not be executed
h1zzz [Fri, 24 Sep 2021 07:33:38 +0000 (15:33 +0800)] 
llist: remove redundant code, branch will not be executed

Closes #7770

3 years agoHTTP-COOKIES.md: remove duplicate 'each'
tlahn [Fri, 24 Sep 2021 10:43:21 +0000 (12:43 +0200)] 
HTTP-COOKIES.md: remove duplicate 'each'

Closes #7772

3 years agolibssh2: Get the version at runtime if possible
Joel Depooter [Thu, 23 Sep 2021 22:54:24 +0000 (15:54 -0700)] 
libssh2: Get the version at runtime if possible

Previously this code used a compile time constant, meaning that libcurl
always reported the libssh2 version that libcurl was built with. This
could differ from the libssh2 version actually being used. The new code
uses the CURL_LIBSSH2_VERSION macro, which is defined in ssh.h. The
macro calls the libssh2_version function if it is available, otherwise
it falls back to the compile time version.

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

3 years agoschannel: fix typo
Joel Depooter [Thu, 23 Sep 2021 22:41:09 +0000 (15:41 -0700)] 
schannel: fix typo

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

3 years agocmake: with OpenSSL, define OPENSSL_SUPPRESS_DEPRECATED
Daniel Stenberg [Thu, 23 Sep 2021 12:19:49 +0000 (14:19 +0200)] 
cmake: with OpenSSL, define OPENSSL_SUPPRESS_DEPRECATED

To avoid the "... is deprecated" warnings brought by OpenSSL v3.
(We need to address the underlying code at some point of course.)

Assisted-by: Jakub Zakrzewski
Closes #7767

3 years agocurl-openssl: pass argument to sed single-quoted
Daniel Stenberg [Thu, 23 Sep 2021 11:17:23 +0000 (13:17 +0200)] 
curl-openssl: pass argument to sed single-quoted

... instead of using an escaped double-quote. This is an attempt to make
this work better with ksh that otherwise would insist on a double
escape!

Reported-by: Randall S. Becker
Fixes #7758
Closes #7764

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 23 Sep 2021 11:10:52 +0000 (13:10 +0200)] 
RELEASE-NOTES: synced

Bumped curlver to 7.80.0-dev

3 years agomisc: fix typos in docs and comments
a1346054 [Sun, 19 Sep 2021 13:25:48 +0000 (13:25 +0000)] 
misc: fix typos in docs and comments

No user facing output from curl/libcurl is changed by this, just
comments.

Closes #7747

3 years agoci: update Lift config to match requirements of curl build
Thomas M. DuBuisson [Thu, 23 Sep 2021 02:05:06 +0000 (19:05 -0700)] 
ci: update Lift config to match requirements of curl build

Also renamed Muse -> Lift, the new tool name.

Closes #7761

3 years agocleanup: constify unmodified static structs
Rikard Falkeborn [Tue, 21 Sep 2021 22:21:03 +0000 (00:21 +0200)] 
cleanup: constify unmodified static structs

Constify a number of static structs that are never modified. Make them
const to show this.

Closes #7759

3 years agoRELEASE-NOTES: synced curl-7_79_1
Daniel Stenberg [Wed, 22 Sep 2021 06:10:23 +0000 (08:10 +0200)] 
RELEASE-NOTES: synced

curl 7.79.1 release

3 years agoTHANKS: added names from the 7.79.1 release
Daniel Stenberg [Wed, 22 Sep 2021 06:10:23 +0000 (08:10 +0200)] 
THANKS: added names from the 7.79.1 release

3 years agotest897: verify delivery of IMAP post-body header content
Daniel Stenberg [Mon, 20 Sep 2021 08:33:26 +0000 (10:33 +0200)] 
test897: verify delivery of IMAP post-body header content

The "content" is delivered as "body" by curl, but the envelope continues
after the body and the rest of it should be delivered as header.

The IMAP server can now get 'POSTFETCH' set to include more data to
include after the body and test 897 is done to verify that such "extra"
header data is in fact delivered by curl as header.

Ref: #7284 but fails to reproduce the issue

Closes #7748

3 years agoKNOWN_BUGS: connection migration doesn't work
Daniel Stenberg [Sun, 19 Sep 2021 21:20:42 +0000 (23:20 +0200)] 
KNOWN_BUGS: connection migration doesn't work

Closes #7695

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 19 Sep 2021 11:38:04 +0000 (13:38 +0200)] 
RELEASE-NOTES: synced

3 years agohttp: fix the broken >3 digit response code detection
Daniel Stenberg [Fri, 17 Sep 2021 14:31:25 +0000 (16:31 +0200)] 
http: fix the broken >3 digit response code detection

When the "reason phrase" in the HTTP status line starts with a digit,
that was treated as the forth response code digit and curl would claim
the response to be non-compliant.

Added test 1466 to verify this case.

Regression brought by 5dc594e44f73b17
Reported-by: Glenn de boer
Fixes #7738
Closes #7739

3 years agostrerror: use sys_errlist instead of strerror on Windows
Jay Satiro [Fri, 17 Sep 2021 03:47:08 +0000 (23:47 -0400)] 
strerror: use sys_errlist instead of strerror on Windows

- Change Curl_strerror to use sys_errlist[errnum] instead of strerror to
  retrieve the error message on Windows.

Windows' strerror writes to a static buffer and is not thread-safe.

Follow-up to 2f0bb86 which removed most instances of strerror in favor
of calling Curl_strerror (which calls strerror_r for other platforms).

Ref: https://github.com/curl/curl/pull/7685
Ref: https://github.com/curl/curl/commit/2f0bb86

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

3 years agodist: provide lib/.checksrc in the tarball
Daniel Stenberg [Thu, 16 Sep 2021 13:54:10 +0000 (15:54 +0200)] 
dist: provide lib/.checksrc in the tarball

So that debug builds work (checksrc really)

Reported-by: Marcel Raad
Reported-by: tawmoto on github
Fixes #7733
Closes #7734

3 years agoTODO: Improve documentation about fork safety
Daniel Stenberg [Thu, 16 Sep 2021 11:43:58 +0000 (13:43 +0200)] 
TODO: Improve documentation about fork safety

Closes #6968

3 years agohsts: CURLSTS_FAIL from hsts read callback should fail transfer
Daniel Stenberg [Thu, 16 Sep 2021 06:40:21 +0000 (08:40 +0200)] 
hsts: CURLSTS_FAIL from hsts read callback should fail transfer

... and have CURLE_ABORTED_BY_CALLBACK returned.

Extended test 1915 to verify.

Reported-by: Jonathan Cardoso
Fixes #7726
Closes #7729

3 years agotest1184: disable
Daniel Stenberg [Thu, 16 Sep 2021 08:50:41 +0000 (10:50 +0200)] 
test1184: disable

The test should be fine and it works for me repeated when run manually,
but clearly it causes CI failures and it needs more research.

Reported-by: RiderALT on github
Fixes #7725
Closes #7732

3 years agoCurl_http2_setup: don't change connection data on repeat invokes
Daniel Stenberg [Thu, 16 Sep 2021 06:50:54 +0000 (08:50 +0200)] 
Curl_http2_setup: don't change connection data on repeat invokes

Regression from 3cb8a748670ab88c (releasde in 7.79.0). That change moved
transfer oriented inits to before the check but also erroneously moved a
few connection oriented ones, which causes problems.

Reported-by: Evangelos Foutras
Fixes #7730
Closes #7731

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 16 Sep 2021 08:08:09 +0000 (10:08 +0200)] 
RELEASE-NOTES: synced

and bump to 7.79.1

3 years agotests/sshserver.pl: make it work with openssh-8.7p1
Kamil Dudka [Wed, 15 Sep 2021 07:59:14 +0000 (09:59 +0200)] 
tests/sshserver.pl: make it work with openssh-8.7p1

... by not using options with no argument where an argument is required:

=== Start of file tests/log/ssh_server.log
curl_sshd_config line 6: no argument after keyword "DenyGroups"
curl_sshd_config line 7: no argument after keyword "AllowGroups"
curl_sshd_config line 10: Deprecated option AuthorizedKeysFile2
curl_sshd_config line 29: Deprecated option KeyRegenerationInterval
curl_sshd_config line 39: Deprecated option RhostsRSAAuthentication
curl_sshd_config line 40: Deprecated option RSAAuthentication
curl_sshd_config line 41: Deprecated option ServerKeyBits
curl_sshd_config line 45: Deprecated option UseLogin
curl_sshd_config line 56: no argument after keyword "AcceptEnv"
curl_sshd_config: terminating, 3 bad configuration options
=== End of file tests/log/ssh_server.log

=== Start of file log/sftp_server.log
curl_sftp_config line 33: Unsupported option "rhostsrsaauthentication"
curl_sftp_config line 34: Unsupported option "rsaauthentication"
curl_sftp_config line 52: no argument after keyword "sendenv"
curl_sftp_config: terminating, 1 bad configuration options
Connection closed.
Connection closed
=== End of file log/sftp_server.log

Closes #7724

3 years agohsts: handle unlimited expiry
Daniel Stenberg [Tue, 14 Sep 2021 14:20:47 +0000 (16:20 +0200)] 
hsts: handle unlimited expiry

When setting a blank expire string, meaning unlimited, curl would pass
TIME_T_MAX to getime_r() when creating the output, while on 64 bit
systems such a large value cannot be convetered to a tm struct making
curl to exit the loop with an error instead. It can't be converted
because the year it would represent doesn't fit in the 'int tm_year'
field!

Starting now, unlimited expiry is instead handled differently by using a
human readable expiry date spelled out as "unlimited" instead of trying
to use a distant actual date.

Test 1660 and 1915 have been updated to help verify this change.

Reported-by: Jonathan Cardoso
Fixes #7720
Closes #7721

3 years agocurl_multi_fdset: make FD_SET() not operate on sockets out of range
Daniel Stenberg [Tue, 14 Sep 2021 11:03:06 +0000 (13:03 +0200)] 
curl_multi_fdset: make FD_SET() not operate on sockets out of range

The VALID_SOCK() macro was made to only check for FD_SETSIZE if curl was
built to use select(), even though the curl_multi_fdset() function
always and unconditionally uses FD_SET and needs the check.

Reported-by: 0xee on github
Fixes #7718
Closes #7719

3 years agoFAQ: add GOPHERS + curl works on data, not files
Daniel Stenberg [Wed, 15 Sep 2021 12:33:05 +0000 (14:33 +0200)] 
FAQ: add GOPHERS + curl works on data, not files

3 years agoRELEASE-NOTES: synced curl-7_79_0
Daniel Stenberg [Tue, 14 Sep 2021 06:59:56 +0000 (08:59 +0200)] 
RELEASE-NOTES: synced

For the 7.79.0 release

3 years agoTHANKS: add contributors from 7.79.0 release cycle
Daniel Stenberg [Tue, 14 Sep 2021 07:02:30 +0000 (09:02 +0200)] 
THANKS: add contributors from 7.79.0 release cycle

3 years agoFAQ: add two dev related questions
Daniel Stenberg [Mon, 13 Sep 2021 15:21:38 +0000 (17:21 +0200)] 
FAQ: add two dev related questions

  8.1 Why does curl use C89?
  8.2 Will curl be rewritten?

Spell-checked-by: Paul Johnson
Closes #7715

3 years agozuul.d/jobs: disable three tests for *-openssl-disable-proxy
Daniel Stenberg [Mon, 13 Sep 2021 10:33:27 +0000 (12:33 +0200)] 
zuul.d/jobs: disable three tests for *-openssl-disable-proxy

... as they mysteriously seem to permfail without being related to
proxy.

Closes #7714

3 years agoftp,imap,pop3,smtp: reject STARTTLS server response pipelining
Patrick Monnerat [Tue, 7 Sep 2021 11:26:42 +0000 (13:26 +0200)] 
ftp,imap,pop3,smtp: reject STARTTLS server response pipelining

If a server pipelines future responses within the STARTTLS response, the
former are preserved in the pingpong cache across TLS negotiation and
used as responses to the encrypted commands.

This fix detects pipelined STARTTLS responses and rejects them with an
error.

CVE-2021-22947

Bug: https://curl.se/docs/CVE-2021-22947.html

3 years agoftp,imap,pop3: do not ignore --ssl-reqd
Patrick Monnerat [Wed, 8 Sep 2021 09:56:22 +0000 (11:56 +0200)] 
ftp,imap,pop3: do not ignore --ssl-reqd

In imap and pop3, check if TLS is required even when capabilities
request has failed.

In ftp, ignore preauthentication (230 status of server greeting) if TLS
is required.

Bug: https://curl.se/docs/CVE-2021-22946.html

CVE-2021-22946

3 years agomqtt: clear the leftovers pointer when sending succeeds
z2_ on hackerone [Tue, 24 Aug 2021 07:50:33 +0000 (09:50 +0200)] 
mqtt: clear the leftovers pointer when sending succeeds

CVE-2021-22945

Bug: https://curl.se/docs/CVE-2021-22945.html

3 years agozuul: bump the rustls job to use v0.7.2
Daniel Stenberg [Fri, 10 Sep 2021 22:12:13 +0000 (00:12 +0200)] 
zuul: bump the rustls job to use v0.7.2

... and add -lm when using a rust library.

Closes #7701

3 years agoRELEASE-PROCEDURE: add release dates from now to 8.0.0 in 2023
Daniel Stenberg [Mon, 13 Sep 2021 14:32:41 +0000 (16:32 +0200)] 
RELEASE-PROCEDURE: add release dates from now to 8.0.0 in 2023

3 years agoSECURITY-PROCESS: tweak a little to match current practices
Daniel Stenberg [Mon, 13 Sep 2021 08:23:50 +0000 (10:23 +0200)] 
SECURITY-PROCESS: tweak a little to match current practices

Closes #7713

3 years agohttp_proxy: fix the User-Agent inclusion in CONNECT
Daniel Stenberg [Sat, 11 Sep 2021 22:20:22 +0000 (00:20 +0200)] 
http_proxy: fix the User-Agent inclusion in CONNECT

It should not refer to the uagent string that is allocated and created
for the end server http request, as that pointer may be cleared on
subsequent CONNECT requests.

Added test case 1184 to verify.

Reported-by: T200proX7 on github
Fixes #7705
Closes #7707

3 years agoCurl_hsts_loadcb: don't attempt to load if hsts wasn't inited
Daniel Stenberg [Sun, 12 Sep 2021 21:22:47 +0000 (23:22 +0200)] 
Curl_hsts_loadcb: don't attempt to load if hsts wasn't inited

Reported-by: Jonathan Cardoso
Fixes #7710
Closes #7711

3 years agongtcp2: fix build with ngtcp2 and nghttp3
Tatsuhiro Tsujikawa [Sun, 12 Sep 2021 06:27:33 +0000 (15:27 +0900)] 
ngtcp2: fix build with ngtcp2 and nghttp3

ngtcp2_conn_client_new and nghttp3_conn_client_new are now macros.
Check the wrapped functions instead.

ngtcp2_stream_close callback now takes flags parameter.

Closes #7709

3 years agowrite-out.d: clarify size_download/upload
Daniel Stenberg [Sat, 11 Sep 2021 20:59:38 +0000 (22:59 +0200)] 
write-out.d: clarify size_download/upload

They show the number of "body" bytes transfered.
Fixes #7702
Closes #7706

3 years agohttp2: Curl_http2_setup needs to init stream data in all invokes
Daniel Stenberg [Fri, 10 Sep 2021 09:39:22 +0000 (11:39 +0200)] 
http2: Curl_http2_setup needs to init stream data in all invokes

Thus function was written to avoid doing multiple connection data
initializations, which is fine, but since it also initiates stream
related data it is crucial that it doesn't skip those even if called
again for the same connection. Solved by moving the stream
initializations before the "doing-it-again" check.

Reported-by: Inho Oh
Fixes #7630
Closes #7692

3 years agourl: fix compiler warning in no-verbose builds
Daniel Stenberg [Fri, 10 Sep 2021 15:09:05 +0000 (17:09 +0200)] 
url: fix compiler warning in no-verbose builds

Follow-up from 2f0bb864c12

Closes #7700

3 years agonon-ascii: fix build errors from strerror fix
Daniel Stenberg [Fri, 10 Sep 2021 13:16:21 +0000 (15:16 +0200)] 
non-ascii: fix build errors from strerror fix

Follow-up to 2f0bb864c12

Closes #7697

3 years agoparse_args: redo the warnings for --remote-header-name combos
Daniel Stenberg [Fri, 10 Sep 2021 13:28:20 +0000 (15:28 +0200)] 
parse_args: redo the warnings for --remote-header-name combos

... to avoid the memory leak risk pointed out by scan-build.

Follow-up from 7a3e981781d6c18a

Closes #7698

3 years agongtcp2: adapt to new size defintions upstream
Daniel Stenberg [Fri, 10 Sep 2021 13:40:51 +0000 (15:40 +0200)] 
ngtcp2: adapt to new size defintions upstream

Reviewed-by: Tatsuhiro Tsujikawa
Closes #7699

3 years agorustls: add strerror.h include
Daniel Stenberg [Fri, 10 Sep 2021 13:20:20 +0000 (15:20 +0200)] 
rustls: add strerror.h include

Follow-up to 2f0bb864c12

3 years agodocs: the security list is reached at security at curl.se now
Daniel Stenberg [Thu, 9 Sep 2021 12:46:38 +0000 (14:46 +0200)] 
docs: the security list is reached at security at curl.se now

Also update the FAQ section a bit to encourage users to rather submit
security issues on hackerone than sending email.

Closes #7689

3 years agoruntests: add option -u to error on server unexpectedly alive
Marc Hoersken [Wed, 2 Jun 2021 18:57:44 +0000 (20:57 +0200)] 
runtests: add option -u to error on server unexpectedly alive

Let's try to actually handle the server unexpectedly alive
case by first making them visible on CI builds as failures.

This is needed to detect issues with killing of the test
servers completely including nested process chains with
multiple PIDs per test server (including bash and perl).

On Windows/cygwin platforms this is especially helpful with
debugging PID mixups due to cygwin using its own PID space.

Reviewed-by: Daniel Stenberg
Closes #7180

3 years agoopts docs: unify phrasing in NAME header
Daniel Stenberg [Wed, 8 Sep 2021 20:55:58 +0000 (22:55 +0200)] 
opts docs: unify phrasing in NAME header

- avoid writing "set ..." or "enable/disable ..." or "specify ..."
  *All* options for curl_easy_setopt() are about setting or enabling
  things and most of the existing options didn't use that way of
  description.

- start with lowercase letter, unless abbreviation. For consistency.

- Some additional touch-ups

Closes #7688

3 years agostrerror.h: remove the #include from files not using it
Daniel Stenberg [Wed, 8 Sep 2021 12:42:35 +0000 (14:42 +0200)] 
strerror.h: remove the #include from files not using it

3 years agolib: don't use strerror()
Daniel Stenberg [Wed, 8 Sep 2021 09:27:49 +0000 (11:27 +0200)] 
lib: don't use strerror()

We have and provide Curl_strerror() internally for a reason: strerror()
is not necessarily thread-safe so we should always try to avoid it.

Extended checksrc to warn for this, but feature the check disabled by
default and only enable it in lib/

Closes #7685

3 years agocirrus: Add FreeBSD 13.0 job and disable sanitizer build
Daniel Gustafsson [Wed, 8 Sep 2021 08:14:45 +0000 (10:14 +0200)] 
cirrus: Add FreeBSD 13.0 job and disable sanitizer build

As alluded to the in the now removed comment, a 13.0 image became
available and is now ready to be used.

The sanitizer builds were running on the 12.1 image which since has
been removed from the config, leaving the builds not running at all.
When enabled it turns out that they don't actually work due to very
long timeouts in executing the tests, so keep the disabled for now
but a bit more controlled.

Closes #7592

3 years agocopyrights: update copyright year ranges
Daniel Stenberg [Wed, 8 Sep 2021 07:36:49 +0000 (09:36 +0200)] 
copyrights: update copyright year ranges

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 8 Sep 2021 06:54:29 +0000 (08:54 +0200)] 
RELEASE-NOTES: synced

3 years agoINTERNALS: c-ares has a new home: c-ares.org
Daniel Stenberg [Tue, 7 Sep 2021 12:56:09 +0000 (14:56 +0200)] 
INTERNALS: c-ares has a new home: c-ares.org

3 years agodocs: remove experimental mentions from HSTS and MQTT
Daniel Stenberg [Mon, 6 Sep 2021 21:04:13 +0000 (23:04 +0200)] 
docs: remove experimental mentions from HSTS and MQTT

Reported-by: Jonathan Cardoso
Bug: https://github.com/curl/curl/pull/6700#issuecomment-913792863
Closes #7681

3 years agocurl: add warning for incompatible parameters usage
Cao ZhenXiang [Sun, 5 Sep 2021 05:04:38 +0000 (13:04 +0800)] 
curl: add warning for incompatible parameters usage

--continue-at - and --remote-header-name are known incompatible parameters

Closes #7674

3 years agoexamples/*hiperfifo.c: fix calloc arguments to match function proto
git-bruh [Mon, 6 Sep 2021 13:51:30 +0000 (19:21 +0530)] 
examples/*hiperfifo.c: fix calloc arguments to match function proto

Closes #7678

3 years agoINTERNALS: bump c-ares requirement to 1.16.0
Daniel Stenberg [Mon, 6 Sep 2021 14:00:52 +0000 (16:00 +0200)] 
INTERNALS: bump c-ares requirement to 1.16.0

Since ba904db0705c93 we use ares_getaddrinfo, added in c-ares 1.16.0

3 years agocurl: stop retry if Retry-After: is longer than allowed
Daniel Stenberg [Mon, 6 Sep 2021 07:08:01 +0000 (09:08 +0200)] 
curl: stop retry if Retry-After: is longer than allowed

If Retry-After: specifies a period that is longer than what fits within
--retry-max-time, then stop retrying immediately.

Added test 366 to verify.

Reported-by: Kari Pahula
Fixes #7675
Closes #7676

3 years agombedtls: avoid using a large buffer on the stack
MAntoniak [Tue, 17 Aug 2021 16:40:25 +0000 (18:40 +0200)] 
mbedtls: avoid using a large buffer on the stack

Use dynamic memory allocation for the buffer used in checking "pinned
public key". The PUB_DER_MAX_BYTES parameter with default settings is
set to a value greater than 2kB.

Co-authored-by: Daniel Stenberg
Closes #7586

3 years agoconfigure: make --disable-hsts work
Daniel Stenberg [Sat, 4 Sep 2021 21:41:07 +0000 (23:41 +0200)] 
configure: make --disable-hsts work

The AC_ARG_ENABLE() macro itself uses a variable called
'enable_[option]', so when our script also used a variable with that
name for the purpose of storing what the user wants, it also
accidentally made it impossible to switch off the feature with
--disable-hsts. Fix this by renaming our variable.

Reported-by: Michał Antoniak
Fixes #7669
Closes #7672

3 years agoconfig.d: note that curlrc is used even when --config
Jay Satiro [Fri, 3 Sep 2021 06:19:33 +0000 (02:19 -0400)] 
config.d: note that curlrc is used even when --config

Bug: https://github.com/curl/curl/pull/7666#issuecomment-912214751
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/7667

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 4 Sep 2021 09:42:05 +0000 (11:42 +0200)] 
RELEASE-NOTES: synced

3 years agotest1173: check references to libcurl options
Daniel Stenberg [Wed, 1 Sep 2021 10:57:06 +0000 (12:57 +0200)] 
test1173: check references to libcurl options

... that they refer to actual existing libcurl options.

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoCURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also
Daniel Stenberg [Thu, 2 Sep 2021 07:21:27 +0000 (09:21 +0200)] 
CURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also

Closes #7656

3 years agoopt-docs: verify man page sections + order
Daniel Stenberg [Wed, 1 Sep 2021 08:26:36 +0000 (10:26 +0200)] 
opt-docs: verify man page sections + order

In every libcurl option man page there are now 8 mandatory sections that
must use the right name in the correct order and test 1173 verifies
this. Only 14 man pages needed adjustments.

The sections and the order is as follows:

 - NAME
 - SYNOPSIS
 - DESCRIPTION
 - PROTOCOLS
 - EXAMPLE
 - AVAILABILITY
 - RETURN VALUE
 - SEE ALSO

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoopt-docs: make sure all man pages have examples
Daniel Stenberg [Wed, 1 Sep 2021 07:23:37 +0000 (09:23 +0200)] 
opt-docs: make sure all man pages have examples

Extended manpage-syntax.pl (run by test 1173) to check that every man
page for a libcurl option has an EXAMPLE section that is more than two
lines. Then fixed all errors it found and added examples.

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoget.d: provide more useful examples
Daniel Stenberg [Fri, 3 Sep 2021 08:14:06 +0000 (10:14 +0200)] 
get.d: provide more useful examples

Closes #7668

3 years agopage-header: add GOPHERS, simplify wording in the 1st para
Daniel Stenberg [Thu, 2 Sep 2021 21:19:48 +0000 (23:19 +0200)] 
page-header: add GOPHERS, simplify wording in the 1st para

Closes #7665

3 years agoconnect: get local port + ip also when reusing connections
Daniel Stenberg [Thu, 2 Sep 2021 13:57:25 +0000 (15:57 +0200)] 
connect: get local port + ip also when reusing connections

Regression. In d6a37c23a3c (7.75.0) we removed the duplicated storage
(connection + easy handle), so this info needs be extracted again even
for re-used connections.

Add test 435 to verify

Reported-by: Max Dymond
Fixes #7660
Closes #7662

3 years agomulti: fix compiler warning with `CURL_DISABLE_WAKEUP` 7661/head
Marcel Raad [Thu, 2 Sep 2021 13:47:42 +0000 (15:47 +0200)] 
multi: fix compiler warning with `CURL_DISABLE_WAKEUP`

`use_wakeup` is unused in this case.

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

3 years agotests: adjust the tftpd output to work with hyper mode
Daniel Stenberg [Wed, 1 Sep 2021 13:51:06 +0000 (15:51 +0200)] 
tests: adjust the tftpd output to work with hyper mode

By making them look less like http headers, the hyper mode "tweak"
doesn't interfere.

Enable test 2002 and 2003 in hyper builds (and 1280 which is unrelated
but should be enabled).

Closes #7658

3 years agoopenssl: annotate SSL3_MT_SUPPLEMENTAL_DATA
Gisle Vanem [Tue, 31 Aug 2021 12:08:34 +0000 (14:08 +0200)] 
openssl: annotate SSL3_MT_SUPPLEMENTAL_DATA

This adds support for the previously unhandled supplemental data which
in -v output was printed like:

    TLSv1.2 (IN), TLS header, Unknown (23):

These will now be printed with proper annotation:

    TLSv1.2 (OUT), TLS header, Supplemental data (23):

Closes #7652
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agocurl.1: provide examples for each option
Daniel Stenberg [Tue, 31 Aug 2021 14:37:14 +0000 (16:37 +0200)] 
curl.1: provide examples for each option

The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654

3 years agoprogress: make trspeed avoid floats
Daniel Stenberg [Tue, 31 Aug 2021 12:09:28 +0000 (14:09 +0200)] 
progress: make trspeed avoid floats

and compiler warnings for data conversions.

Reported-by: Michał Antoniak
Fixes #7645
Closes #7653

3 years agotest365: verify response with chunked AND Content-Length headers
Daniel Stenberg [Mon, 30 Aug 2021 20:45:15 +0000 (22:45 +0200)] 
test365: verify response with chunked AND Content-Length headers