]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 years agoutil: silence conversion warnings
Marcel Raad [Thu, 16 Jul 2020 16:52:03 +0000 (18:52 +0200)] 
util: silence conversion warnings

timeval::tv_usec might be a 32-bit integer and timespec::tv_nsec might
be a 64-bit integer. This is the case when building for recent macOS
versions, for example. Just treat tv_usec as an int, which should
hopefully always be sufficient on systems with
`HAVE_CLOCK_GETTIME_MONOTONIC`.

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

5 years agomd(4|5): don't use deprecated macOS functions
Marcel Raad [Thu, 16 Jul 2020 14:40:12 +0000 (16:40 +0200)] 
md(4|5): don't use deprecated macOS functions

They are marked as deprecated for -mmacosx-version-min >= 10.15,
which might result in warnings-as-errors.

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

5 years agostrdup: remove the odd strlen check
Daniel Stenberg [Fri, 17 Jul 2020 22:57:05 +0000 (00:57 +0200)] 
strdup: remove the odd strlen check

It confuses code analyzers with its use of -1 for unsigned value. Also,
a check that's not normally used in strdup() code - and not necessary.

Closes #5697

5 years agotravis: update quiche builds for new boringssl layout
Alessandro Ghedini [Thu, 16 Jul 2020 21:31:21 +0000 (22:31 +0100)] 
travis: update quiche builds for new boringssl layout

This is required after https://github.com/cloudflare/quiche/pull/593
moved BoringSSL around slightly.

This also means that Go is not needed to build BoringSSL anymore (the
one provided by quiche anyway).

Closes #5691

5 years agoconfigure: allow disabling warnings
Marcel Raad [Wed, 15 Jul 2020 19:28:00 +0000 (21:28 +0200)] 
configure: allow disabling warnings

When using `--enable-warnings`, it was not possible to disable warnings
via CFLAGS that got explicitly enabled. Now warnings are not enabled
anymore if they are explicitly disabled (or enabled) in CFLAGS. This
works for at least GCC, clang, and TCC as they have corresponding
`-Wno-` options for every warning.

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

5 years agongtcp2: adjust to recent sockaddr updates
Daniel Stenberg [Thu, 16 Jul 2020 19:00:25 +0000 (21:00 +0200)] 
ngtcp2: adjust to recent sockaddr updates

Closes #5690

5 years agopage-header: provide protocol details in the curl.1 man page
Daniel Stenberg [Wed, 15 Jul 2020 15:42:44 +0000 (17:42 +0200)] 
page-header: provide protocol details in the curl.1 man page

Add protocol and version specific information about all protocols curl
supports.

Fixes #5679
Reported-by: tbugfinder on github
Closes #5686

5 years agodocs: Update a few leftover mentions of DarwinSSL
Daniel Gustafsson [Thu, 16 Jul 2020 08:11:10 +0000 (10:11 +0200)] 
docs: Update a few leftover mentions of DarwinSSL

Commit 76a9c3c4be10b3d4d379d5b23ca76806bbae536a renamed DarwinSSL to the
more correct/common name Secure Transport, but a few mentions in the docs
remained.

Closes #5688
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
5 years agofile2memory: use a define instead of -1 unsigned value
Daniel Stenberg [Wed, 15 Jul 2020 12:04:32 +0000 (14:04 +0200)] 
file2memory: use a define instead of -1 unsigned value

... to use the maximum value for 'size_t' when detecting integer overflow.
Changed the limit to max/4 as already that seems unreasonably large.

Codacy didn't like the previous approach.

Closes #5683

5 years agoCURL_PUSH_ERROROUT: allow the push callback to fail the parent stream
Daniel Stenberg [Wed, 15 Jul 2020 22:24:29 +0000 (00:24 +0200)] 
CURL_PUSH_ERROROUT: allow the push callback to fail the parent stream

... by adding support for a new dedicated return code.

Suggested-by: Jonathan Cardoso
Assisted-by: Erik Johansson
URL: https://curl.haxx.se/mail/lib-2020-06/0099.html
Closes #5636

5 years agonss: fix build with disabled proxy support
Baruch Siach [Thu, 9 Jul 2020 05:14:49 +0000 (08:14 +0300)] 
nss: fix build with disabled proxy support

Avoid reference to fields that do not exist when CURL_DISABLE_PROXY is
defined.

Closes #5667

5 years agotest1139: make it display the difference on test failures 5644/head
Daniel Stenberg [Fri, 3 Jul 2020 15:02:33 +0000 (17:02 +0200)] 
test1139: make it display the difference on test failures

5 years agotest1119: verify stdout in the test
Daniel Stenberg [Fri, 3 Jul 2020 09:33:19 +0000 (11:33 +0200)] 
test1119: verify stdout in the test

So that failures will be displayed in the terminal, as it makes test failures
visually displayed easier and faster.

Closes #5644

5 years agocurl: add %{method} to the -w variables
Daniel Stenberg [Mon, 13 Jul 2020 07:58:29 +0000 (09:58 +0200)] 
curl: add %{method} to the -w variables

Gets the CURLINFO_EFFECTIVE_METHOD from libcurl.

Added test 1197 to verify.

5 years agoCURLINFO_EFFECTIVE_METHOD: added
Daniel Stenberg [Mon, 13 Jul 2020 07:58:28 +0000 (09:58 +0200)] 
CURLINFO_EFFECTIVE_METHOD: added

Provide the HTTP method that was used on the latest request, which might
be relevant for users when there was one or more redirects involved.

Closes #5511

5 years agowindows: add unicode to feature list
Viktor Szakats [Tue, 14 Jul 2020 08:30:17 +0000 (08:30 +0000)] 
windows: add unicode to feature list

Reviewed-by: Marcel Raad
Reviewed-by: Marc Hörsken
Closes #5491

5 years agomulti: remove two checks always true
Daniel Stenberg [Sun, 12 Jul 2020 16:26:35 +0000 (18:26 +0200)] 
multi: remove two checks always true

Detected by Codacy
Closes #5676

5 years agoworkflows: limit what branches to run CodeQL on
Marc Hoersken [Sun, 12 Jul 2020 20:07:38 +0000 (22:07 +0200)] 
workflows: limit what branches to run CodeQL on

Align CodeQL action with existing CI actions:
- Update branch filter to avoid duplicate CI runs.
- Shorten workflow name due to informative job name.

Reviewed-by: Daniel Stenberg
Closes #5660

5 years agoappveyor: collect libcurl.dll variants with prefix or suffix
Marc Hoersken [Sun, 12 Jul 2020 20:04:00 +0000 (22:04 +0200)] 
appveyor: collect libcurl.dll variants with prefix or suffix

On some platforms libcurl is build with a platform-specific
prefix and/or a version number suffix.

Assisted-by: Jay Satiro
Closes #5659

5 years agosocks: use size_t for size variable
ihsinme [Sun, 5 Jul 2020 12:19:25 +0000 (15:19 +0300)] 
socks: use size_t for size variable

Use the unsigned type (size_t) in the arithmetic of pointers. In this
context, the signed type (ssize_t) is used unnecessarily.

Authored-by: ihsinme on github
Closes #5654

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 12 Jul 2020 16:16:23 +0000 (18:16 +0200)] 
RELEASE-NOTES: synced

... and bumped to 7.72.0 as the next release version number

5 years agocontent_encoding: add zstd decoding support
Gilles Vollant [Mon, 25 May 2020 15:49:46 +0000 (17:49 +0200)] 
content_encoding: add zstd decoding support

include zstd curl patch for Makefile.m32 from vszakats
and include Add CMake support for zstd from Peter Wu

Helped-by: Viktor Szakats
Helped-by: Peter Wu
Closes #5453

5 years agoasyn.h: remove the Curl_resolver_getsock define
Daniel Stenberg [Fri, 3 Jul 2020 16:21:18 +0000 (18:21 +0200)] 
asyn.h: remove the Curl_resolver_getsock define

 - not used
 - used the wrong number of arguments
 - confused the Codeacy code analyzer

Closes #5647

5 years agoconfigure.ac: Sort features name in summary
Nicolas Sterchele [Mon, 6 Jul 2020 12:15:48 +0000 (14:15 +0200)] 
configure.ac: Sort features name in summary

- Same as protocols

Closes #5656

5 years agocmake: fix windows xp build
Matthias Naegler [Wed, 8 Jul 2020 12:14:53 +0000 (14:14 +0200)] 
cmake: fix windows xp build

Reviewed-by: Marcel Raad
Closes #5662

5 years agongtcp2: update to modified qlog callback prototype
Daniel Stenberg [Sun, 12 Jul 2020 14:32:10 +0000 (16:32 +0200)] 
ngtcp2: update to modified qlog callback prototype

Closes #5675

5 years agotransfer: fix memory-leak with CURLOPT_CURLU in a duped handle
Daniel Stenberg [Sat, 11 Jul 2020 22:45:27 +0000 (00:45 +0200)] 
transfer: fix memory-leak with CURLOPT_CURLU in a duped handle

Added test case 674 to reproduce and verify the bug report.

Fixes #5665
Reported-by: NobodyXu on github
Closes #5673

5 years agobearssl: fix build with disabled proxy support
Baruch Siach [Thu, 9 Jul 2020 05:14:49 +0000 (08:14 +0300)] 
bearssl: fix build with disabled proxy support

Avoid reference to fields that do not exist when CURL_DISABLE_PROXY is
defined.

Reviewed-by: Nicolas Sterchele
Closes #5666

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 11 Jul 2020 21:13:18 +0000 (23:13 +0200)] 
RELEASE-NOTES: synced

5 years agocirrus-ci: upgrade 11-STABLE to 11.4
Carlo Marcelo Arenas Belón [Thu, 9 Jul 2020 07:16:21 +0000 (00:16 -0700)] 
cirrus-ci: upgrade 11-STABLE to 11.4

Meant to be the last of the 11 series and so make sure that all
other references reflect all 11 versions so they can be retired
together later.

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

5 years agoCURLINFO_CERTINFO.3: fix typo
Filip Salomonsson [Sat, 4 Jul 2020 11:56:50 +0000 (13:56 +0200)] 
CURLINFO_CERTINFO.3: fix typo

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

5 years agohttp2: only do the *done() cleanups for HTTP
Daniel Stenberg [Fri, 3 Jul 2020 22:10:04 +0000 (00:10 +0200)] 
http2: only do the *done() cleanups for HTTP

Follow-up to ef86daf4d3

Closes #5650
Fixes #5646

5 years agognutls: repair the build with `CURL_DISABLE_PROXY`
Alex Kiernan [Fri, 26 Jun 2020 09:08:32 +0000 (09:08 +0000)] 
gnutls: repair the build with `CURL_DISABLE_PROXY`

`http_proxy`/`proxy_ssl`/`tunnel_proxy` will not be available in `conn`
if `CURL_DISABLE_PROXY` is enabled.  Repair the build with that
configuration.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Closes #5645

5 years agognutls: Fetch backend when using proxy
Alex Kiernan [Fri, 26 Jun 2020 08:59:24 +0000 (08:59 +0000)] 
gnutls: Fetch backend when using proxy

Fixes: 89865c149 ("gnutls: remove the BACKEND define kludge")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
5 years agohttp2: close the http2 connection when no more requests may be sent
Laramie Leavitt [Thu, 2 Jul 2020 23:46:22 +0000 (16:46 -0700)] 
http2: close the http2 connection when no more requests may be sent

Well-behaving HTTP2 servers send two GOAWAY messages. The first
message is a warning that indicates that the server is going to
stop accepting streams. The second one actually closes the stream.

nghttp2 reports this state (and the other state of no more stream
identifiers) via the call nghttp2_session_check_request_allowed().
In this state the client should not create more streams on the
session (tcp connection), and in curl this means that the server
has requested that the connection is closed.

It would be also be possible to put the connclose() call into the
on_http2_frame_recv() function that triggers on the GOAWAY message.

This fixes a bug seen when the client sees the following sequence of
frames:

// advisory GOAWAY
HTTP2 GOAWAY [stream-id = 0, promised-stream-id = -1]
... some additional frames

// final GOAWAY
HTTP2 GOAWAY [stream-id = 0, promised-stream-id = N ]

Before this change, curl will attempt to reuse the connection even
after the last stream, will encounter this error:

* Found bundle for host localhost: 0x5595f0a694e0 [can multiplex]
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (::1) port 10443 (#0)
* Using Stream ID: 9 (easy handle 0x5595f0a72e30)
> GET /index.html?5 HTTP/2
> Host: localhost:10443
> user-agent: curl/7.68.0
> accept: */*
>
* stopped the pause stream!
* Connection #0 to host localhost left intact
curl: (16) Error in the HTTP2 framing layer

This error may posion the connection cache, causing future requests
which resolve to the same curl connection to go through the same error
path.

Closes #5643

5 years agoftpserver: don't verify SMTP MAIL FROM names
Daniel Stenberg [Thu, 2 Jul 2020 14:42:55 +0000 (16:42 +0200)] 
ftpserver: don't verify SMTP MAIL FROM names

Rely on tests asking the names to get refused instead - test servers
should be as dumb as possible. Edited test 914, 955 and 959 accordingly.

Closes #5639

5 years agocurl_version_info.3: CURL_VERSION_KERBEROS4 is deprecated
Daniel Stenberg [Thu, 2 Jul 2020 21:46:40 +0000 (23:46 +0200)] 
curl_version_info.3: CURL_VERSION_KERBEROS4 is deprecated

This came up in #5640. It make sense to clarify this in the docs!

Reminded-by: Kamil Dudka
Closes #5642

5 years agotool_getparam: make --krb option work again
Kamil Dudka [Thu, 2 Jul 2020 15:41:37 +0000 (17:41 +0200)] 
tool_getparam: make --krb option work again

It was disabled by mistake in commit curl-7_37_1-23-ge38ba4301.

Bug: https://bugzilla.redhat.com/1833193
Closes #5640