]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agotiny-curl: 7.72.0 release curl-tiny-7.72 8070/head tiny-curl-7_72_0
Daniel Stenberg [Thu, 27 Aug 2020 07:42:11 +0000 (09:42 +0200)] 
tiny-curl: 7.72.0 release

4 years agomaketgz: move to the same version number as curl itself
Daniel Stenberg [Thu, 27 Aug 2020 07:41:59 +0000 (09:41 +0200)] 
maketgz: move to the same version number as curl itself

4 years agosocketpair: allow CURL_DISABLE_SOCKETPAIR
Daniel Stenberg [Fri, 14 Aug 2020 13:45:08 +0000 (15:45 +0200)] 
socketpair: allow CURL_DISABLE_SOCKETPAIR

... to completely disable the use of socketpair

4 years agocurl_get_line: build if cookies or alt-svc are enabled
Daniel Stenberg [Fri, 14 Aug 2020 13:43:41 +0000 (15:43 +0200)] 
curl_get_line: build if cookies or alt-svc are enabled

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

4 years agotiny-curl: base and FreeRTOS support
Daniel Stenberg [Wed, 27 May 2020 08:27:38 +0000 (10:27 +0200)] 
tiny-curl: base and FreeRTOS support

4 years agoRELEASE-NOTES: synced curl-7_72_0
Daniel Stenberg [Wed, 19 Aug 2020 07:37:28 +0000 (09:37 +0200)] 
RELEASE-NOTES: synced

The curl 7.72.0 release

4 years agoTHANKS: add names from curl 7.72.0 release
Daniel Stenberg [Wed, 19 Aug 2020 07:37:27 +0000 (09:37 +0200)] 
THANKS: add names from curl 7.72.0 release

4 years agoKNOWN_BUGS: Schannel TLS 1.2 handshake bug in old Windows versions
Jay Satiro [Tue, 18 Aug 2020 07:24:38 +0000 (03:24 -0400)] 
KNOWN_BUGS: Schannel TLS 1.2 handshake bug in old Windows versions

Reported-by: plujon@users.noreply.github.com
Closes https://github.com/curl/curl/issues/5488

4 years agoCurl_easy: remember last connection by id, not by pointer
Daniel Stenberg [Sun, 16 Aug 2020 09:34:35 +0000 (11:34 +0200)] 
Curl_easy: remember last connection by id, not by pointer

CVE-2020-8231

Bug: https://curl.haxx.se/docs/CVE-2020-8231.html

Reported-by: Marc Aldorasi
Closes #5824

4 years agoexamples/rtsp.c: correct the copyright year
Daniel Stenberg [Sun, 16 Aug 2020 22:34:08 +0000 (00:34 +0200)] 
examples/rtsp.c: correct the copyright year

4 years agoRELEASE-PROCEDURE.md: add more future release dates
Daniel Stenberg [Mon, 17 Aug 2020 08:44:10 +0000 (10:44 +0200)] 
RELEASE-PROCEDURE.md: add more future release dates

4 years agodocs: change "web site" to "website"
H3RSKO [Sun, 16 Aug 2020 20:36:10 +0000 (16:36 -0400)] 
docs: change "web site" to "website"

According to wikipedia:

 While "web site" was the original spelling, this variant has become
 rarely used, and "website" has become the standard spelling

Closes #5822

4 years agoCMake: don't complain about missing nroff
Bevan Weiss [Sat, 15 Aug 2020 09:02:44 +0000 (19:02 +1000)] 
CMake: don't complain about missing nroff

The curl_nroff_check() was always being called, and complaining if
*NROFF wasn't found, even when not making the manual.

Only check for nroff (and complain) if actually making the manual

Closes #5817

4 years agolibtest/Makefile.am: add -no-undefined for libstubgss for Cygwin
Brian Inglis [Sat, 15 Aug 2020 21:57:30 +0000 (15:57 -0600)] 
libtest/Makefile.am: add -no-undefined for libstubgss for Cygwin

copy the LDFLAGS approach for adding same option with `libhostname` in
`libtest/Makefile.am`:

- init `libstubgss_la_LDFLAGS_EXTRA` variable,
- add option to variable inside conditional,
- use variable in `libstubgss_la_LDFLAGS`

Fixes #5819
Closes #5820

4 years agodocs: clarify MAX_SEND/RECV_SPEED functionality
Daniel Stenberg [Fri, 14 Aug 2020 14:49:42 +0000 (16:49 +0200)] 
docs: clarify MAX_SEND/RECV_SPEED functionality

... in particular what happens if the maximum speed limit is set to a
value that's smaller than the transfer buffer size in use.

Reported-by: Tomas Berger
Fixes #5788
Closes #5813

4 years agotest1140: compare stdout
Daniel Stenberg [Fri, 14 Aug 2020 15:48:43 +0000 (17:48 +0200)] 
test1140: compare stdout

To make problems more immediately obvious when tests fail.

Closes #5814

4 years agoasyn-ares: correct some bad comments
Daniel Stenberg [Fri, 14 Aug 2020 14:28:29 +0000 (16:28 +0200)] 
asyn-ares: correct some bad comments

Closes #5812

4 years agodocs: Add video link to docs/CONTRIBUTE.md
Emil Engler [Fri, 14 Aug 2020 06:50:15 +0000 (08:50 +0200)] 
docs: Add video link to docs/CONTRIBUTE.md

Closes #5811

4 years agocurl-config: ignore REQUIRE_LIB_DEPS in --libs output
Daniel Stenberg [Thu, 13 Aug 2020 10:00:31 +0000 (12:00 +0200)] 
curl-config: ignore REQUIRE_LIB_DEPS in --libs output

Fixes a curl-config issue on cygwin by making sure REQUIRE_LIB_DEPS is
not considered for the --libs output.

Reported-by: ramsay-jones on github
Assisted-by: Brian Inglis and Ken Brown
Fixes #5793
Closes #5808

4 years agocopyright: update/correct the year range on a few files
Daniel Stenberg [Fri, 14 Aug 2020 08:20:27 +0000 (10:20 +0200)] 
copyright: update/correct the year range on a few files

4 years agoscripts/copyright.pl: ignore .muse files
Daniel Stenberg [Fri, 14 Aug 2020 08:20:05 +0000 (10:20 +0200)] 
scripts/copyright.pl: ignore .muse files

4 years agomulti: Remove 10-year old out-commented code
Emil Engler [Wed, 12 Aug 2020 09:58:11 +0000 (11:58 +0200)] 
multi: Remove 10-year old out-commented code

The code hasn't been touched since 2010-08-18

Closes #5805

4 years agoKNOWN_BUGS: A shared connection cache is not thread-safe
Daniel Stenberg [Tue, 11 Aug 2020 13:43:42 +0000 (15:43 +0200)] 
KNOWN_BUGS: A shared connection cache is not thread-safe

Closes #4915
Closes #5802

4 years agoCONTRIBUTE: extend git commit message description
Daniel Stenberg [Tue, 11 Aug 2020 14:49:57 +0000 (16:49 +0200)] 
CONTRIBUTE: extend git commit message description

In particular how the first line works.

Closes #5803

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 11 Aug 2020 07:41:37 +0000 (09:41 +0200)] 
RELEASE-NOTES: synced

4 years agotransfer: move retrycount from connect struct to easy handle
Stefan Yohansson [Mon, 10 Aug 2020 12:16:37 +0000 (13:16 +0100)] 
transfer: move retrycount from connect struct to easy handle

This flag was applied to the connection struct that is released on
retry.  These changes move the retry counter into Curl_easy struct that
lives across retries and retains the new connection.

Reported-by: Cherish98 on github
Fixes #5794
Closes #5800

4 years agolibssh2: s/ssherr/sftperr/
Daniel Stenberg [Mon, 10 Aug 2020 10:59:16 +0000 (12:59 +0200)] 
libssh2: s/ssherr/sftperr/

The debug output used ssherr instead of sftperr which not only outputs
the wrong error code but also casues a warning on Windows.

Follow-up to 7370b4e39f1

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/7370b4e39f1390e701f5b68d910c619151daf72b#r41334700
Closes #5799

4 years agoftp: don't do ssl_shutdown instead of ssl_close
Daniel Stenberg [Mon, 10 Aug 2020 08:56:20 +0000 (10:56 +0200)] 
ftp: don't do ssl_shutdown instead of ssl_close

The shutdown function is for downgrading a connection from TLS to plain,
and this is not requested here.

Have ssl_close reset the TLS connection state.

This partially reverts commit f002c850d98d

Reported-by: Rasmus Melchior Jacobsen
Reported-by: Denis Goleshchikhin
Fixes #5797

4 years agoCI/azure: fix test outcome values and use latest API version
Marc Hoersken [Sun, 9 Aug 2020 13:56:59 +0000 (15:56 +0200)] 
CI/azure: fix test outcome values and use latest API version

This makes sure that tests ignored or skipped are not shown
just in the category "Other", but with their correct state.

Closes #5796

4 years agoCI/azure: show runtime stats to investigate slowness
Marc Hoersken [Wed, 5 Aug 2020 13:07:30 +0000 (15:07 +0200)] 
CI/azure: show runtime stats to investigate slowness

Also avoid naming conflict of TFLAGS env and tflags variables.

Closes #5776

4 years agoTLS naming: fix more Winssl and Darwinssl leftovers
Daniel Stenberg [Fri, 7 Aug 2020 15:11:52 +0000 (17:11 +0200)] 
TLS naming: fix more Winssl and Darwinssl leftovers

The CMake option is now called CMAKE_USE_SCHANNEL

The winbuild flag is USE_SCHANNEL

The CI jobs and build scripts only use the new names and the new name
options

Tests now require 'Schannel' (when necessary)

Closes #5795

4 years agosmtp_parse_address: handle blank input string properly
Daniel Stenberg [Thu, 6 Aug 2020 22:15:12 +0000 (00:15 +0200)] 
smtp_parse_address: handle blank input string properly

Closes #5792

4 years agoruntests: run the DICT server on a random port number
Daniel Stenberg [Wed, 5 Aug 2020 13:11:22 +0000 (15:11 +0200)] 
runtests: run the DICT server on a random port number

Removed support for -b (base port number)

Closes #5783

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 6 Aug 2020 21:56:31 +0000 (23:56 +0200)] 
RELEASE-NOTES: synced

4 years agoruntests: move the TELNET server to a dynamic port
Daniel Stenberg [Wed, 5 Aug 2020 13:39:34 +0000 (15:39 +0200)] 
runtests: move the TELNET server to a dynamic port

Rename the port variable to TELNETPORT to better match the existing
pattern.

Closes #5785

4 years agongtcp2: adapt to error code rename
Daniel Stenberg [Wed, 5 Aug 2020 16:12:36 +0000 (18:12 +0200)] 
ngtcp2: adapt to error code rename

Closes #5786

4 years agoruntests: move the smbserver to use a dynamic port number
Daniel Stenberg [Wed, 5 Aug 2020 13:03:46 +0000 (15:03 +0200)] 
runtests: move the smbserver to use a dynamic port number

Closes #5782

4 years agoruntests: run the http2 tests on a random port number
Daniel Stenberg [Tue, 4 Aug 2020 16:08:34 +0000 (18:08 +0200)] 
runtests: run the http2 tests on a random port number

Closes #5779

4 years agogtls: survive not being able to get name/issuer
Daniel Stenberg [Wed, 5 Aug 2020 08:54:39 +0000 (10:54 +0200)] 
gtls: survive not being able to get name/issuer

Closes #5778

4 years agoruntests: move the gnutls-serv tests to a dynamic port
Daniel Stenberg [Tue, 4 Aug 2020 15:47:09 +0000 (17:47 +0200)] 
runtests: move the gnutls-serv tests to a dynamic port

Affects test 320, 321, 322 and 324.

Closes #5778

4 years agoruntests: support dynamicly base64 encoded sections in tests
Daniel Stenberg [Tue, 4 Aug 2020 11:56:12 +0000 (13:56 +0200)] 
runtests: support dynamicly base64 encoded sections in tests

This allows us to make test cases to use base64 at run-time and still
use and verify information determined at run-time, such as the IMAP test
server's port number in test 842.

This change makes 12 tests run again that basically never ran since we
moved to dynamic port numbers.

ftpserver.pl is adjusted to load test instructions and test number from
the preprocessed test file.

FILEFORMAT.md now documents the new base64 encoding syntax.

Reported-by: Marcel Raad
Fixes #5761
Closes #5775

4 years agocurl.1: add a few missing valid exit codes
Daniel Stenberg [Tue, 4 Aug 2020 14:01:28 +0000 (16:01 +0200)] 
curl.1: add a few missing valid exit codes

93 - 96 can be returned as well.

Closes #5777

4 years agoTODO: Use multiple parallel transfers for a single download
Daniel Stenberg [Tue, 4 Aug 2020 14:14:41 +0000 (16:14 +0200)] 
TODO: Use multiple parallel transfers for a single download

Closes #5774

4 years agoTODO: Set the modification date on an uploaded file
Daniel Stenberg [Tue, 4 Aug 2020 14:09:08 +0000 (16:09 +0200)] 
TODO: Set the modification date on an uploaded file

Closes #5768

4 years agoCI: Add muse CI config
Thomas M. DuBuisson [Sat, 1 Aug 2020 15:42:00 +0000 (08:42 -0700)] 
CI: Add muse CI config

Closes #5772

4 years agotravis/script.sh: fix use of `-n' with unquoted envvar
Thomas M. DuBuisson [Tue, 4 Aug 2020 02:12:34 +0000 (19:12 -0700)] 
travis/script.sh: fix use of `-n' with unquoted envvar

Shellcheck tells us "-n doesn't work with unquoted arguments. quote or
use [[ ]]."

And testing shows:

```
docker run --rm -it ubuntu bash
root@fe85ce156856:/# [ -n $DOES_NOT_EXIST ] && echo "I ran"
I ran
root@fe85ce156856:/# [ -n "$DOES_NOT_EXIST" ] && echo "I ran"
root@fe85ce156856:/#
```

Closes #5773

4 years agoh2: repair trailer handling
Daniel Stenberg [Mon, 3 Aug 2020 10:19:09 +0000 (12:19 +0200)] 
h2: repair trailer handling

The previous h2 trailer fix in 54a2b63 was wrong and caused a
regression: it cannot deal with trailers immediately when read since
they may be read off the connection by the wrong 'data' owner.

This change reverts the logic back to gathering all trailers into a
single buffer, like before 54a2b63.

Reported-by: Tadej Vengust
Fixes #5663
Closes #5769

4 years agowindows: disable Unix Sockets for old mingw
Viktor Szakats [Mon, 3 Aug 2020 14:27:27 +0000 (14:27 +0000)] 
windows: disable Unix Sockets for old mingw

Classic mingw and 10y+ old versions of mingw-w64 don't ship with
Windows headers having the typedef necessary for Unix Sockets
support, so try detecting these environments to disable this
feature.

Ref: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/cf6afc57179a5910621215f8f4037d406892072c/

Reviewed-by: Daniel Stenberg
Fixes #5674
Closes #5758

5 years agotest1908: treat file as text
Marcel Raad [Sun, 2 Aug 2020 14:39:39 +0000 (16:39 +0200)] 
test1908: treat file as text

Fixes the line endings on Windows.

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

5 years agoTrackMemory tests: ignore realloc and free in getenv.c
Marcel Raad [Sun, 2 Aug 2020 13:41:49 +0000 (15:41 +0200)] 
TrackMemory tests: ignore realloc and free in getenv.c

These are only called for WIN32.

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

5 years agotests/FILEFORMAT.md: mention %HTTP2PORT
Daniel Stenberg [Mon, 3 Aug 2020 09:42:16 +0000 (11:42 +0200)] 
tests/FILEFORMAT.md: mention %HTTP2PORT

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 3 Aug 2020 08:20:26 +0000 (10:20 +0200)] 
RELEASE-NOTES: synced

5 years agotlsv1.3.d. only for TLS-using connections
Daniel Stenberg [Sun, 2 Aug 2020 09:20:51 +0000 (11:20 +0200)] 
tlsv1.3.d. only for TLS-using connections

... and rephrase that "not all" TLS backends support it.

Closes #5764

5 years agotls-max.d: this option is only for TLS-using connections
Daniel Stenberg [Sun, 2 Aug 2020 09:20:33 +0000 (11:20 +0200)] 
tls-max.d: this option is only for TLS-using connections

Ref: #5763
Closes #5764

5 years agotool_doswin: Simplify Windows version detection
Cameron Cawley [Fri, 31 Jul 2020 19:39:33 +0000 (20:39 +0100)] 
tool_doswin: Simplify Windows version detection

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

5 years agowin32: Add Curl_verify_windows_version() to curlx
Cameron Cawley [Fri, 31 Jul 2020 19:36:56 +0000 (20:36 +0100)] 
win32: Add Curl_verify_windows_version() to curlx

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

5 years agoruntests.pl: treat LibreSSL and BoringSSL as OpenSSL
Marcel Raad [Sat, 1 Aug 2020 16:00:50 +0000 (18:00 +0200)] 
runtests.pl: treat LibreSSL and BoringSSL as OpenSSL

This makes the tests that require the OpenSSL feature also run for
those two compatible libraries.

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

5 years agomulti: Condition 'extrawait' is always true
Daniel Stenberg [Sat, 1 Aug 2020 16:09:21 +0000 (18:09 +0200)] 
multi: Condition 'extrawait' is always true

Reported by Codacy.

Reviewed-by: Marcel Raad
Closes #5759

5 years agoopenssl: fix build with LibreSSL < 2.9.1
Marcel Raad [Sat, 1 Aug 2020 09:51:59 +0000 (11:51 +0200)] 
openssl: fix build with LibreSSL < 2.9.1

`SSL_CTX_add0_chain_cert` and `SSL_CTX_clear_chain_certs` were
introduced in LibreSSL 2.9.1 [0].

[0] https://github.com/libressl-portable/openbsd/commit/0db809ee178457c8170abfae3931d7bd13abf3ef

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

5 years agomulti_remove_handle: close unused connect-only connections
Marc Aldorasi [Thu, 30 Jul 2020 18:16:17 +0000 (14:16 -0400)] 
multi_remove_handle: close unused connect-only connections

Previously any connect-only connections in a multi handle would be kept
alive until the multi handle was closed.  Since these connections cannot
be re-used, they can be marked for closure when the associated easy
handle is removed from the multi handle.

Closes #5749

5 years agochecksrc: invoke script with -D to find .checksrc proper
Daniel Stenberg [Fri, 31 Jul 2020 22:30:19 +0000 (00:30 +0200)] 
checksrc: invoke script with -D to find .checksrc proper

Without the -D command line option, checksrc.pl won't know which
directory to load the ".checksrc" file from when building out of the
source tree.

Reported-by: Marcel Raad
Fixes #5715
Closes #5755

5 years agobuildconf: retire ares buildconf invocation
Carlo Marcelo Arenas Belón [Sun, 19 Jul 2020 22:59:19 +0000 (15:59 -0700)] 
buildconf: retire ares buildconf invocation

no longer needed after 4259d2df7dd95637a4b1e3fb174fe5e5aef81069

5 years agobuildconf: excempt defunct reference to ACLOCAL_FLAGS
Carlo Marcelo Arenas Belón [Sun, 19 Jul 2020 22:41:43 +0000 (15:41 -0700)] 
buildconf: excempt defunct reference to ACLOCAL_FLAGS

retired with 09f278121e815028adb24d228d8092fc6cb022aa but kept around as
the name is generic enough that it might be in use and relied upon from
the environment.

5 years agobuildconf: avoid array concatenation in die()
Carlo Marcelo Arenas Belón [Sun, 19 Jul 2020 22:36:05 +0000 (15:36 -0700)] 
buildconf: avoid array concatenation in die()

reported as error SC2145[1] by shellcheck, but not expected to cause
any behavioural differences otherwise.

[1] https://github.com/koalaman/shellcheck/wiki/SC2145

Closes #5701

5 years agotravis: add ppc64le and s390x builds
Daniel Stenberg [Fri, 31 Jul 2020 17:50:23 +0000 (19:50 +0200)] 
travis: add ppc64le and s390x builds

Closes #5752

5 years agoconnect: remove redundant message about connect failure
Marc Hoersken [Tue, 28 Jul 2020 18:54:18 +0000 (20:54 +0200)] 
connect: remove redundant message about connect failure

Reviewed-by: Daniel Stenberg
Closes #5708

5 years agotests/sshserver.pl: fix compatibility with OpenSSH for Windows
Marc Hoersken [Sun, 26 Jul 2020 19:38:26 +0000 (21:38 +0200)] 
tests/sshserver.pl: fix compatibility with OpenSSH for Windows

Follow up to #5721

5 years agoCI/azure: install libssh2 for use with msys2-based builds
Marc Hoersken [Fri, 24 Jul 2020 20:59:17 +0000 (22:59 +0200)] 
CI/azure: install libssh2 for use with msys2-based builds

This enables building and running the SFTP tests.
Unfortunately OpenSSH for Windows does not support SCP (yet).

Reviewed-by: Daniel Stenberg
Closes #5721

5 years agoCI/azure: increase Windows job timeout once again
Marc Hoersken [Tue, 28 Jul 2020 08:00:38 +0000 (10:00 +0200)] 
CI/azure: increase Windows job timeout once again

Avoid aborted jobs due to performance issues on Azure DevOps.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #5738

5 years agoTODO: Schannel: 'Add option to allow abrupt server closure'
Jay Satiro [Thu, 30 Jul 2020 16:25:05 +0000 (12:25 -0400)] 
TODO: Schannel: 'Add option to allow abrupt server closure'

We should offer an option to allow abrupt server closures (server closes
SSL transfer without sending a known termination point such as length of
transfer or close_notify alert). Abrupt server closures are usually
because of misconfigured or very old servers.

Closes https://github.com/curl/curl/issues/4427

5 years agourl: fix CURLU and location following
Jay Satiro [Thu, 23 Jul 2020 07:16:14 +0000 (03:16 -0400)] 
url: fix CURLU and location following

Prior to this change if the user set a URL handle (CURLOPT_CURLU) it was
incorrectly used for the location follow, resulting in infinite requests
to the original location.

Reported-by: sspiri@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/5709
Closes https://github.com/curl/curl/pull/5713

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 29 Jul 2020 22:06:27 +0000 (00:06 +0200)] 
RELEASE-NOTES: synced

5 years agodocs: add date of 7.20 to CURLM_CALL_MULTI_PERFORM mentions
divinity76 [Wed, 29 Jul 2020 13:55:56 +0000 (15:55 +0200)] 
docs: add date of 7.20 to CURLM_CALL_MULTI_PERFORM mentions

it helps make it obvious that most developers don't have to care about
the CURLM_CALL_MULTI_PERFORM value (last release using it is nearly 11
years old, November 4 2009)

Closes #5744

5 years agotool_cb_wrt: fix outfile mode flags for Windows
Jay Satiro [Wed, 29 Jul 2020 07:21:57 +0000 (03:21 -0400)] 
tool_cb_wrt: fix outfile mode flags for Windows

- Use S_IREAD and S_IWRITE mode permission flags to create the file
  on Windows instead of S_IRUSR, S_IWUSR, etc.

Windows only accepts a combination of S_IREAD and S_IWRITE. It does not
acknowledge other combinations, for which it may generate an assertion.

This is a follow-up to 81b4e99 from yesterday, which improved the
existing file check with -J.

Ref: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen#remarks
Ref: https://github.com/curl/curl/pull/5731

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

5 years agochecksrc: ban gmtime/localtime
Daniel Stenberg [Mon, 27 Jul 2020 12:28:37 +0000 (14:28 +0200)] 
checksrc: ban gmtime/localtime

They're not thread-safe so they should not be used in libcurl code.

Explictly enabled when deemed necessary and in examples and tests

Reviewed-by: Nicolas Sterchele
Closes #5732

5 years agotransfer: fix data_pending for builds with both h2 and h3 enabled
Daniel Stenberg [Mon, 27 Jul 2020 13:43:45 +0000 (15:43 +0200)] 
transfer: fix data_pending for builds with both h2 and h3 enabled

Closes #5734

5 years agocurl_multi_setopt: fix compiler warning "result is always false"
Daniel Stenberg [Mon, 27 Jul 2020 21:49:42 +0000 (23:49 +0200)] 
curl_multi_setopt: fix compiler warning "result is always false"

On systems with 32 bit long the expression is always false. Avoid
the warning.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/61a08508f6a458fe21bbb18cd2a9bac2f039452b#commitcomment-40941232
Closes #5736

5 years agocurl: improve the existing file check with -J
Daniel Stenberg [Mon, 27 Jul 2020 10:44:19 +0000 (12:44 +0200)] 
curl: improve the existing file check with -J

Previously a file that isn't user-readable but is user-writable would
not be properly avoided and would get overwritten.

Reported-by: BrumBrum on hackerone
Assisted-by: Jay Satiro
Bug: https://hackerone.com/reports/926638
Closes #5731

5 years agomulti: update comment to say easyp list is linear
Jonathan Nieder [Mon, 27 Jul 2020 23:24:54 +0000 (16:24 -0700)] 
multi: update comment to say easyp list is linear

Since 09b9fc900 (multi: remove 'Curl_one_easy' struct, phase 1,
2013-08-02), the easy handle list is not circular but ends with
->next pointing to NULL.

Reported-by: Masaya Suzuki <masayasuzuki@google.com>
Closes #5737

5 years agoCURLOPT_NOBODY.3: fix the syntax for referring to options
Daniel Stenberg [Mon, 27 Jul 2020 21:59:00 +0000 (23:59 +0200)] 
CURLOPT_NOBODY.3: fix the syntax for referring to options

As test 1140 fails otherwise!

Follow-up to e1bac81cc815

5 years agongtcp2: store address in sockaddr_storage
Daniel Stenberg [Mon, 27 Jul 2020 12:53:08 +0000 (14:53 +0200)] 
ngtcp2: store address in sockaddr_storage

Reported-by: Tatsuhiro Tsujikawa
Closes #5733

5 years agoCURLOPT_NOBODY.3: clarify what setting to 0 means
Daniel Stenberg [Mon, 27 Jul 2020 09:54:29 +0000 (11:54 +0200)] 
CURLOPT_NOBODY.3: clarify what setting to 0 means

... and mention that HTTP with other methods than HEAD might get a body and
there's no option available to stop that.

Closes #5729

5 years agosetopt: unset NOBODY switches to GET if still HEAD
Daniel Stenberg [Mon, 27 Jul 2020 09:44:01 +0000 (11:44 +0200)] 
setopt: unset NOBODY switches to GET if still HEAD

Unsetting CURLOPT_NOBODY with 0L when doing HTTP has no documented
action but before 7.71.0 that used to switch back to GET and with this
change (assuming the method is still set to HEAD) this behavior is
brought back.

Reported-by: causal-agent on github
Fixes #5725
Closes #5728

5 years agoconfigure: cleanup wolfssl + pkg-config conflicts when cross compiling.
Ehren Bendler [Wed, 15 Jul 2020 02:38:38 +0000 (22:38 -0400)] 
configure: cleanup wolfssl + pkg-config conflicts when cross compiling.

Also choose a different wolfSSL function to test for NTLM support.

Fixes #5605
Closes #5682

5 years agoconfigure: show zstd "no" in summary when built without it
Daniel Stenberg [Mon, 27 Jul 2020 10:07:40 +0000 (12:07 +0200)] 
configure: show zstd "no" in summary when built without it

Reported-by: Marc Hörsken
Fixes #5720
Closes #5730

5 years agoquiche: handle calling disconnect twice
Daniel Stenberg [Mon, 27 Jul 2020 09:17:31 +0000 (11:17 +0200)] 
quiche: handle calling disconnect twice

Reported-by: lilongyan-huawei on github
Fixes #5726
Closes #5727

5 years agogetinfo: reset retry-after value in initinfo
Nicolas Sterchele [Fri, 10 Jul 2020 18:05:21 +0000 (20:05 +0200)] 
getinfo: reset retry-after value in initinfo

- Avoid re-using retry_after value from preceding request
- Add libtest 3010 to verify

Reported-by: joey-l-us on github
Fixes #5661
Closes #5672

5 years agoWIN32: stop forcing narrow-character API
Marcel Raad [Thu, 23 Jul 2020 19:28:14 +0000 (21:28 +0200)] 
WIN32: stop forcing narrow-character API

Except where the results are only used for character output.
getenv is not touched because it's part of the public API, and having
it return UTF-8 instead of ANSI would be a breaking change.

Fixes https://github.com/curl/curl/issues/5658
Fixes https://github.com/curl/curl/issues/5712
Closes https://github.com/curl/curl/pull/5718

5 years agomprintf: Fix stack overflows
Tobias Stoeckmann [Sat, 25 Jul 2020 15:30:12 +0000 (17:30 +0200)] 
mprintf: Fix stack overflows

Stack overflows can occur with precisions for integers and floats.

Proof of concepts:
- curl_mprintf("%d, %.*1$d", 500, 1);
- curl_mprintf("%d, %+0500.*1$f", 500, 1);

Ideally, compile with -fsanitize=address which makes this undefined
behavior a bit more defined for debug purposes.

The format strings are valid. The overflows occur due to invalid
arguments. If these arguments are variables with contents controlled
by an attacker, the function's stack can be corrupted.

Also see CVE-2016-9586 which partially fixed the float aspect.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Closes https://github.com/curl/curl/pull/5722

5 years agomprintf: Fix dollar string handling
Tobias Stoeckmann [Sat, 25 Jul 2020 15:29:38 +0000 (17:29 +0200)] 
mprintf: Fix dollar string handling

Verify that specified parameters are in range. If parameters are too
large, fail early on and avoid out of boundary accesses.

Also do not read behind boundaries of illegal format strings.

These are defensive measures since it is expected that format strings
are well-formed. Format strings should not be modifiable by user
input due to possible generic format string attacks.

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

5 years agontlm: free target_info before (re-)malloc
Daniel Stenberg [Sun, 26 Jul 2020 15:00:48 +0000 (17:00 +0200)] 
ntlm: free target_info before (re-)malloc

OSS-Fuzz found a way this could get called again with the pointer still
pointing to a malloc'ed memory, leading to a leak.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24379

Closes #5724

5 years agoCI/macos: set minimum macOS version
Marcel Raad [Wed, 15 Jul 2020 08:03:15 +0000 (10:03 +0200)] 
CI/macos: set minimum macOS version

This enables some deprecation warnings.
Previously, autotools defaulted to 10.8.

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

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 26 Jul 2020 10:24:08 +0000 (12:24 +0200)] 
RELEASE-NOTES: synced

5 years agoCI/macos: enable warnings as errors for CMake builds
Marcel Raad [Sun, 19 Jul 2020 09:50:43 +0000 (11:50 +0200)] 
CI/macos: enable warnings as errors for CMake builds

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

5 years agoCMake: fix test for warning suppressions
Marcel Raad [Wed, 22 Jul 2020 20:51:11 +0000 (22:51 +0200)] 
CMake: fix test for warning suppressions

GCC doesn't warn for unknown `-Wno-` options, except if there are other
warnings or errors [0]. This was problematic with `CURL_WERROR` as that
warning-as-error cannot be suppressed. Notably, this always happened
with `-Wno-pedantic-ms-format` when not targeting Windows. So test for
the positive form of the warning instead, which should always result in
a diagnostic if unknown.

[0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

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

5 years agocurl.h: update CURLINFO_LASTONE
Jay Satiro [Thu, 23 Jul 2020 06:44:53 +0000 (02:44 -0400)] 
curl.h: update CURLINFO_LASTONE

CURLINFO_LASTONE should have been updated when
CURLINFO_EFFECTIVE_METHOD was added.

Reported-by: xwxbug@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/5711

5 years agoCI/azure: unconditionally enable warnings-as-errors with autotools
Marc Hoersken [Tue, 21 Jul 2020 17:04:42 +0000 (19:04 +0200)] 
CI/azure: unconditionally enable warnings-as-errors with autotools

Reviewed-by: Marcel Raad
Follow up to #5694
Closes #5706

5 years agodoh: remove redundant cast
Marcel Raad [Sun, 19 Jul 2020 13:02:16 +0000 (15:02 +0200)] 
doh: remove redundant cast

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

5 years agoCI/macos: unconditionally enable warnings-as-errors with autotools
Marcel Raad [Wed, 15 Jul 2020 08:48:44 +0000 (10:48 +0200)] 
CI/macos: unconditionally enable warnings-as-errors with autotools

Previously, warnings were only visible in the output for most jobs.

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