]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agosha256: use high-level EVP interface for OpenSSL 7808/head
Marcel Raad [Sat, 2 Oct 2021 10:32:42 +0000 (12:32 +0200)] 
sha256: use high-level EVP interface for OpenSSL

Available since OpenSSL 0.9.7. The low-level SHA256 interface is
deprecated in OpenSSL v3, and its usage was discouraged even before.

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

3 years agocurl_ntlm_core: use OpenSSL only if DES is available
Marcel Raad [Sat, 2 Oct 2021 08:17:58 +0000 (10:17 +0200)] 
curl_ntlm_core: use OpenSSL only if DES is available

This selects another SSL backend then if available, or otherwise at
least gives a meaningful error message.

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

3 years agomd5: fix compilation with OpenSSL 3.0 API
Marcel Raad [Sun, 26 Sep 2021 07:19:51 +0000 (09:19 +0200)] 
md5: fix compilation with OpenSSL 3.0 API

Only use OpenSSL's MD5 code if it's available.

Also fix wolfSSL build with `NO_MD5`, in which case neither the
wolfSSL/OpenSSL implementation nor the fallback implementation was
used.

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

3 years agoprint_category: printf %*s needs an int argument
Daniel Stenberg [Thu, 7 Oct 2021 08:13:41 +0000 (10:13 +0200)] 
print_category: printf %*s needs an int argument

... not a size_t!

Detected by Coverity: CID 1492331.
Closes #7823

3 years agoversion_win32: use actual version instead of manifested version
Jay Satiro [Mon, 4 Oct 2021 19:52:01 +0000 (15:52 -0400)] 
version_win32: use actual version instead of manifested version

- Use RtlVerifyVersionInfo instead of VerifyVersionInfo, when possible.

Later versions of Windows have normal version functions that compare and
return versions based on the way the application is manifested, instead
of the actual version of Windows the application is running on. We
prefer the actual version of Windows so we'll now call the Rtl variant
of version functions (RtlVerifyVersionInfo) which does a proper
comparison of the actual version.

Reported-by: Wyatt O'Day
Ref: https://github.com/curl/curl/pull/7727

Fixes https://github.com/curl/curl/issues/7742
Closes https://github.com/curl/curl/pull/7810

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 6 Oct 2021 20:52:09 +0000 (22:52 +0200)] 
RELEASE-NOTES: synced

3 years agohttp: fix Basic auth with empty name field in URL
Daniel Stenberg [Wed, 6 Oct 2021 13:40:53 +0000 (15:40 +0200)] 
http: fix Basic auth with empty name field in URL

Add test 367 to verify.

Reported-by: Rick Lane
Fixes #7819
Closes #7820

3 years agoCURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse
Jeffrey Tolar [Sat, 18 Sep 2021 16:29:44 +0000 (11:29 -0500)] 
CURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse

... and close connections that are too old instead of reusing them.

By default, this behavior is disabled.

Bug: https://curl.se/mail/lib-2021-09/0058.html
Closes #7751

3 years agodocs/examples: add missing binaries to gitignore
Daniel Gustafsson [Wed, 6 Oct 2021 08:46:00 +0000 (10:46 +0200)] 
docs/examples: add missing binaries to gitignore

Commit f65d7889b added getreferrer, and commit ae8e11ed5 multi-legacy,
both of which missed adding .gitignore clauses for the built binaries.

Closes #7817
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoHTTP3: fix the HTTP/3 Explained book link
Josip Medved [Tue, 5 Oct 2021 01:32:59 +0000 (18:32 -0700)] 
HTTP3: fix the HTTP/3 Explained book link

Closes #7813

3 years agomisc: fix a few issues on MidnightBSD
Lucas Holt [Mon, 4 Oct 2021 21:15:07 +0000 (17:15 -0400)] 
misc: fix a few issues on MidnightBSD

Closes #7812

3 years agotool_main: fix typo in comment
8U61ife [Mon, 4 Oct 2021 21:25:23 +0000 (05:25 +0800)] 
tool_main: fix typo in comment

Closes: #7811
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
3 years agoBINDINGS: URL updates
Ryan Mast [Mon, 4 Oct 2021 15:30:14 +0000 (08:30 -0700)] 
BINDINGS: URL updates

For cpr, BBHTTP, Eiffel, Harbour, Haskell, Mono, and Rust

Closes #7809

3 years agoscripts/delta: hide a git error message we don't care about
Daniel Stenberg [Sat, 2 Oct 2021 21:36:00 +0000 (23:36 +0200)] 
scripts/delta: hide a git error message we don't care about

fatal: path 'src/tool_listhelp.c' exists on disk, but not in [tag]

3 years agosasl: binary messages
Patrick Monnerat [Sat, 2 Oct 2021 16:05:26 +0000 (18:05 +0200)] 
sasl: binary messages

Capabilities of sasl module are extended to exchange messages in binary
as an alternative to base64.

If http authentication flags have been set, those are used as sasl
default preferred mechanisms.

Closes #6930

3 years agowolfssl: use for SHA256, MD4, MD5, and setting DES odd parity
Hayden Roche [Fri, 1 Oct 2021 23:06:55 +0000 (16:06 -0700)] 
wolfssl: use for SHA256, MD4, MD5, and setting DES odd parity

Prior to this commit, OpenSSL could be used for all these functions, but
not wolfSSL. This commit makes it so wolfSSL will be used if USE_WOLFSSL
is defined.

Closes #7806

3 years agoscripts/delta: count command line options in the new file
Daniel Stenberg [Fri, 1 Oct 2021 06:49:12 +0000 (08:49 +0200)] 
scripts/delta: count command line options in the new file

... which makes the shown delta number wrong until next release.

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 1 Oct 2021 06:46:30 +0000 (08:46 +0200)] 
RELEASE-NOTES: synced

3 years agoprint_category: print help descriptions aligned
Daniel Stenberg [Wed, 29 Sep 2021 10:43:09 +0000 (12:43 +0200)] 
print_category: print help descriptions aligned

Adjust the description position to make an aligned column when doing
help listings, which is more pleasing to the eye.

Suggested-by: Gisle Vanem
Closes #7792

3 years agolib/mk-ca-bundle.pl: skip certs passed Not Valid After date
Daniel Stenberg [Thu, 30 Sep 2021 21:10:35 +0000 (23:10 +0200)] 
lib/mk-ca-bundle.pl: skip certs passed Not Valid After date

With this change applied, the now expired 'DST Root CA X3' cert will no
longer be included in the output.

Details: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

Closes #7801

3 years agotool_listhelp: easier to generate with gen.pl
Daniel Stenberg [Tue, 28 Sep 2021 15:36:09 +0000 (17:36 +0200)] 
tool_listhelp: easier to generate with gen.pl

tool_listhelp.c is now a separate file with only the command line --help
output, exactly as generated by gen.pl. This makes it easier to generate
updates according to what's in the docs/cmdline-opts docs.

  cd $srcroot/docs/cmdline-opts
  ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c

With a configure build, this also works:

  make -C src listhelp

Closes #7787

3 years agowolfssl: allow setting of groups/curves
Anthony Hu [Wed, 15 Sep 2021 18:47:35 +0000 (14:47 -0400)] 
wolfssl: allow setting of groups/curves

In particular, the quantum safe KEM and hybrid curves if wolfSSL is
built to support them.

Closes #7728

3 years agoconnnect: use sysaddr_un fron sys/un.h or custom-defined for windows
Jan Mazur [Tue, 28 Sep 2021 23:13:59 +0000 (00:13 +0100)] 
connnect: use sysaddr_un fron sys/un.h or custom-defined for windows

Closes #7737

3 years agohostip: Move allocation to clarify there is no memleak
Rikard Falkeborn [Wed, 29 Sep 2021 19:15:05 +0000 (21:15 +0200)] 
hostip: Move allocation to clarify there is no memleak

By just glancing at the code, it looks like there is a memleak if the
call to Curl_inet_pton() fails. Looking closer, it is clear that the
call to Curl_inet_pton() can not fail, so the code will never leak
memory. However, we can make this obvious by moving the allocation
after the if-statement.

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

3 years agogen.pl: make the output date format work better
Daniel Stenberg [Wed, 29 Sep 2021 10:57:03 +0000 (12:57 +0200)] 
gen.pl: make the output date format work better

Follow-up to 15910dfd143dd

The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
Closes #7793

3 years agotypecheck-gcc.h: add CURLOPT_PREREQDATA awareness
Daniel Stenberg [Thu, 30 Sep 2021 06:33:32 +0000 (08:33 +0200)] 
typecheck-gcc.h: add CURLOPT_PREREQDATA awareness

Follow-up to a517378de58358a

To make test 1912 happy again

Closes #7799

3 years agoconfigure: remove `HAVE_WINSOCK_H` definition 7795/head
Marcel Raad [Wed, 29 Sep 2021 12:53:04 +0000 (14:53 +0200)] 
configure: remove `HAVE_WINSOCK_H` definition

It's not used anymore.

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

3 years agoCMake: remove `HAVE_WINSOCK_H` definition
Marcel Raad [Wed, 29 Sep 2021 12:52:38 +0000 (14:52 +0200)] 
CMake: remove `HAVE_WINSOCK_H` definition

It's not used anymore.

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

3 years agoconfig: remove `HAVE_WINSOCK_H` definition
Marcel Raad [Wed, 29 Sep 2021 12:51:43 +0000 (14:51 +0200)] 
config: remove `HAVE_WINSOCK_H` definition

It's not used anymore.

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

3 years agolib: remove `HAVE_WINSOCK_H` usage
Marcel Raad [Fri, 17 Sep 2021 23:25:20 +0000 (01:25 +0200)] 
lib: remove `HAVE_WINSOCK_H` usage

WinSock v1 is not supported anymore. Exclusively use `HAVE_WINSOCK2_H`
instead.

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

3 years agoeasyoptions: add the two new PRE* options
Daniel Stenberg [Wed, 29 Sep 2021 08:06:42 +0000 (10:06 +0200)] 
easyoptions: add the two new PRE* options

Follow-up to a517378de58358a

Also fix optiontable.pl to do the correct remainder on the entry.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/a517378de58358a85b7cfe9efecb56051268f629#commitcomment-57224830
Closes #7791

3 years agoRevert "build: remove checks for WinSock 1"
Daniel Stenberg [Wed, 29 Sep 2021 06:16:42 +0000 (08:16 +0200)] 
Revert "build: remove checks for WinSock 1"

Due to CI issues

This reverts commit c2ea04f92b00b6271627cb218647527b5a50f2fc.

Closes #7790

3 years agolib: avoid fallthrough cases in switch statements
Daniel Gustafsson [Wed, 29 Sep 2021 08:00:52 +0000 (10:00 +0200)] 
lib: avoid fallthrough cases in switch statements

Commit b5a434f7f0ee4d64857f8592eced5b9007d83620 inhibits the warning
on implicit fallthrough cases, since the current coding of indicating
fallthrough with comments is falling out of fashion with new compilers.
This attempts to make the issue smaller by rewriting fallthroughs to no
longer fallthrough, via either breaking the cases or turning switch
statements into if statements.

  lib/content_encoding.c: the fallthrough codepath is simply copied
    into the case as it's a single line.
  lib/http_ntlm.c: the fallthrough case skips a state in the state-
    machine and fast-forwards to NTLMSTATE_LAST. Do this before the
    switch statement instead to set up the states that we actually
    want.
  lib/http_proxy.c: the fallthrough is just falling into exiting the
    switch statement which can be done easily enough in the case.
  lib/mime.c: switch statement rewritten as if statement.
  lib/pop3.c: the fallthrough case skips to the next state in the
    statemachine, do this explicitly instead.
  lib/urlapi.c: switch statement rewritten as if statement.
  lib/vssh/wolfssh.c: the fallthrough cases fast-forwards the state
    machine, do this by running another iteration of the switch
    statement instead.
  lib/vtls/gtls.c: switch statement rewritten as if statement.
  lib/vtls/nss.c: the fallthrough codepath is simply copied into the
    case as it's a single line. Also twiddle a comment to not be
    inside a non-brace if statement.

Closes: #7322
See-also: #7295
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoconfig-win32ce: enable WinSock 2
Marcel Raad [Mon, 27 Sep 2021 08:36:06 +0000 (10:36 +0200)] 
config-win32ce: enable WinSock 2

WinSock 2.2 is supported by Windows CE .NET 4.1 (from 2002, out of
support since 2013).

Ref: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms899586(v=msdn.10)

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

3 years agoexternalsocket: use WinSock 2.2
Marcel Raad [Fri, 17 Sep 2021 23:26:27 +0000 (01:26 +0200)] 
externalsocket: use WinSock 2.2

That's the only version we support.

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

3 years agobuild: remove checks for WinSock 1
Marcel Raad [Fri, 17 Sep 2021 23:25:20 +0000 (01:25 +0200)] 
build: remove checks for WinSock 1

It's not supported anymore.

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

3 years agoscripts/copyright: .muse is .lift now
Daniel Stenberg [Tue, 28 Sep 2021 14:42:18 +0000 (16:42 +0200)] 
scripts/copyright: .muse is .lift now

And update 5 files with old copyright year range

3 years agocmdline-opts: made the 'Added:' field mandatory
Daniel Stenberg [Tue, 28 Sep 2021 09:50:07 +0000 (11:50 +0200)] 
cmdline-opts: made the 'Added:' field mandatory

Since "too old" versions are no longer included in the generated man
page, this field is now mandatory so that it won't be forgotten and then
not included in the documentation.

Closes #7786

3 years agocurl.1: remove mentions of really old version changes
Daniel Stenberg [Tue, 28 Sep 2021 08:30:59 +0000 (10:30 +0200)] 
curl.1: remove mentions of really old version changes

To make the man page more readable, this change removes all references
to changes in support/versions etc that happened before 7.30.0 from the
curl.1 output file. 7.30.0 was released on Apr 12 2013. This particular
limit is a bit arbitrary but was fairly easy to grep for.

It is handled like this: the 'Added' keyword is only used in output if
it refers to 7.30.0 or later. All occurances of "(Added in $VERSION)" in
description will be stripped out if the mentioned $VERSION is from
before 7.30.0. It is therefore important that the "Added in..."
references are always written exactly like that - and on a single line,
not split over two.

This change removes about 80 version number references from curl.1, down
to 138 from 218.

Closes #7786

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