]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agontlm: copy NTLM_HOSTNAME to host buffer
Daniel Gustafsson [Sun, 22 May 2022 21:26:24 +0000 (23:26 +0200)] 
ntlm: copy NTLM_HOSTNAME to host buffer

Commit 709ae2454f43 added a fake hostname to avoid leaking the local
hostname, but omitted copying it to the host buffer.  Fix by copying
and adjust the test fallout.

Closes: #8895
Fixes: #8893
Reported-by: Patrick Monnerat <patrick@monnerat.net>
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoconfigure: use the SED value to invoke sed
Daniel Gustafsson [Sat, 21 May 2022 13:34:24 +0000 (15:34 +0200)] 
configure: use the SED value to invoke sed

Rather than assuming sed in PATH, use the resolved $SED variable
like in all other invocations of sed in configure.

Closes: #8891
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
3 years agongtcp2: Allow curl to send larger UDP datagrams
Tatsuhiro Tsujikawa [Sun, 10 Apr 2022 08:35:23 +0000 (17:35 +0900)] 
ngtcp2: Allow curl to send larger UDP datagrams

Allow curl to send larger UDP datagram if Path MTU Discovery finds the
availability of larger path MTU.  To make it work and not to send
fragmented packet, we need to set DF bit.  That makes send(2) fail with
EMSGSIZE if UDP datagram is too large.  In that case, just let it be
lost.  This patch enables DF bit for Linux only.

Closes #8883

3 years agolibcurl-security.3: add "Secrets in memory"
Daniel Stenberg [Fri, 20 May 2022 15:36:25 +0000 (17:36 +0200)] 
libcurl-security.3: add "Secrets in memory"

Closes #8881

3 years agotests: update NTLM tests to use new host name
Daniel Stenberg [Fri, 20 May 2022 14:24:01 +0000 (16:24 +0200)] 
tests: update NTLM tests to use new host name

Also drop the debug requirement, remove the setenv sections, remove
prechecks and add NTLM to the top keywords.

Closes #8889

3 years agontlm: provide a fixed fake host name
Daniel Stenberg [Fri, 20 May 2022 14:23:21 +0000 (16:23 +0200)] 
ntlm: provide a fixed fake host name

The NTLM protocol includes providing the local host name, but apparently
other implementations already provide a fixed fake name instead to avoid
leaking the real local name.

The exact name used is 'WORKSTATION', because Firefox uses that.

The change is written to allow someone to "back-pedal" fairly easy in
case of need.

Reported-by: Carlo Alberto
Fixes #8859
Closes #8889

3 years agoKNOWN_BUGS: fix typo in problem description
Daniel Gustafsson [Fri, 20 May 2022 11:43:35 +0000 (13:43 +0200)] 
KNOWN_BUGS: fix typo in problem description

s/TSL/TLS/

3 years agoFEATURES: remove yassl as TLS library for NTLM
Daniel Gustafsson [Fri, 20 May 2022 11:43:12 +0000 (13:43 +0200)] 
FEATURES: remove yassl as TLS library for NTLM

yassl was added in commit 9d904ee41b880b but is no longer available
and is thus not a library to use for NTLM. This aligns the FEATURES
doc with the FAQ.

Closes: #8886
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoFEATURES: reorder footnotes
Daniel Gustafsson [Fri, 20 May 2022 11:42:45 +0000 (13:42 +0200)] 
FEATURES: reorder footnotes

The empty left-behind footnote confused the website rendering into
creating a nested emoty list, making the resulting page look quite
odd.  Remove and re-order the remaining ones to avoid a gap in the
sequence.

Closes: #8886
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoFAQ: remove opinionated sentence on NTLM
Daniel Gustafsson [Fri, 20 May 2022 11:40:12 +0000 (13:40 +0200)] 
FAQ: remove opinionated sentence on NTLM

curl is a tool that support many different things, and it doesn't
really seem like our job to tell other what to use (as they might
not have much say in the matter even).  Also tidy up wording.

Closes: #8886
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agolog2changes: do not indent empty lines [ci skip]
Viktor Szakats [Fri, 20 May 2022 05:58:05 +0000 (05:58 +0000)] 
log2changes: do not indent empty lines [ci skip]

This will omit two spaces of indentation from lines with no content,
thus avoiding 'spaces @ EOL'.

Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Closes #8887

3 years agowolfssl: correct the failf() message when a handle can't be made
Daniel Stenberg [Thu, 19 May 2022 15:54:30 +0000 (17:54 +0200)] 
wolfssl: correct the failf() message when a handle can't be made

Closes #8885

3 years agoMakefile.m32: delete two obsolete OpenSSL options [ci skip]
Viktor Szakats [Thu, 19 May 2022 16:47:00 +0000 (16:47 +0000)] 
Makefile.m32: delete two obsolete OpenSSL options [ci skip]

- -DOPENSSL_NO_KRB5: No longer used by OpenSSL 1.1.x, 3.x, or
  LibreSSL 3.5.x, yet it collides with the latter, which defines
  it unconditionally, resulting in this warning:
    ../../libressl/include/openssl/opensslfeatures.h:14:9: warning: 'OPENSSL_NO_KRB5' macro redefined [-Wmacro-redefined]
  It was originally added to curl in 2004.

- -DHAVE_OPENSSL_PKCS12_H: No longer used by OpenSSL 1.1.x, 3.x, or
  LibreSSL back to at least 2.5.5. Originally added in the same
  commit as the above, in 2004.

Closes #8884

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 19 May 2022 15:59:09 +0000 (17:59 +0200)] 
RELEASE-NOTES: synced

bump to 7.84.0

3 years agoMakefile.am: fix portability issues
Christian Weisgerber via curl-library [Thu, 19 May 2022 13:45:07 +0000 (15:45 +0200)] 
Makefile.am: fix portability issues

Commit a04f0b961333e1a19848d073d8c7db9c20b2a371 made me notice that
there is a portability issue in curl's top-level Makefile.am.

$< can only be used in rules that deal with .SUFFIXES.  Its use
for general prerequisites is a GNU make extension.

$< could be replaced by $?, but I think in an autotools context,
something like this is better:

Bug: https://curl.se/mail/lib-2022-05/0024.html
Closes #8861

3 years agosocks: support unix sockets for socks proxy
Balakrishnan Balasubramanian [Thu, 19 May 2022 13:33:22 +0000 (15:33 +0200)] 
socks: support unix sockets for socks proxy

Usage:
  curl -x "socks5h://localhost/run/tor/socks" "https://example.com"

Updated runtests.pl to run a socksd server listening on unix socket

Added tests test1467 test1468

Added documentation for proxy command line option and socks proxy
options

Closes #8668

3 years agocmake: add libpsl support
Vincent Torri [Thu, 19 May 2022 13:29:54 +0000 (15:29 +0200)] 
cmake: add libpsl support

Fixes #8865
Closes #8867

3 years agongtcp2: extend QUIC transport parameters buffer
Tatsuhiro Tsujikawa [Tue, 17 May 2022 12:12:57 +0000 (21:12 +0900)] 
ngtcp2: extend QUIC transport parameters buffer

Extend QUIC transport parameters buffer because 64 bytes are too
short for the ever increasing parameters.

Closes #8872

3 years agongtcp2: handle error from ngtcp2_conn_submit_crypto_data
Tatsuhiro Tsujikawa [Tue, 17 May 2022 10:53:02 +0000 (19:53 +0900)] 
ngtcp2: handle error from ngtcp2_conn_submit_crypto_data

Closes #8871

3 years agongtcp2: send appropriate connection close error code
Tatsuhiro Tsujikawa [Sun, 15 May 2022 03:30:43 +0000 (12:30 +0900)] 
ngtcp2: send appropriate connection close error code

Closes #8870

3 years agotest1561: adjusted for the cookie fix
Daniel Stenberg [Thu, 19 May 2022 12:48:26 +0000 (14:48 +0200)] 
test1561: adjusted for the cookie fix

3 years agotest414: verify secure cookie domain overlay
Daniel Stenberg [Thu, 19 May 2022 12:48:26 +0000 (14:48 +0200)] 
test414: verify secure cookie domain overlay

3 years agocookie: address secure domain overlay
Harry Sintonen [Thu, 19 May 2022 12:48:26 +0000 (14:48 +0200)] 
cookie: address secure domain overlay

Bug: https://hackerone.com/reports/1560324
Co-authored-by: Daniel Stenberg
Closes #8840

3 years agostrcase: some optimisations
Frank Gevaerts [Wed, 18 May 2022 12:30:51 +0000 (14:30 +0200)] 
strcase: some optimisations

Lookup tables for toupper() and tolower() make Curl_strcasecompare()
about 1.5 times faster. Reorganising Curl_strcasecompare() to fully exit
early then also allows simplifying the check at the end, for another
15%. In total, the changes make Curl_strcasecompare() around 1.6 to 1.7
times faster.

Note that these optimisation assume ASCII. The original
Curl_raw_toupper() and raw_tolower() look like they already made that
assumption.

Closes #8875

3 years agoBUG-BOUNTY.md: mention the audit exception
Daniel Stenberg [Thu, 19 May 2022 08:20:06 +0000 (10:20 +0200)] 
BUG-BOUNTY.md: mention the audit exception

Dedicated - paid for - security audits that are performed in
collaboration with curl developers are not eligible for bounties.

(plus I changed the sub-titles to use ## instead of # in the markdown)

Closes #8880

3 years agolib/vssh/wolfssh.h: removed
Daniel Stenberg [Tue, 17 May 2022 06:43:03 +0000 (08:43 +0200)] 
lib/vssh/wolfssh.h: removed

Unused header file

Reported-by: Illarion Taev
Fixes #8863
Closes #8866

3 years agowolfSSL: explicitly use compatibility layer
Elms [Tue, 17 May 2022 04:55:24 +0000 (21:55 -0700)] 
wolfSSL: explicitly use compatibility layer

This change removes adding an include `$prefix/wolfssl` or similar to
allow for openssl include aliasing. Include paths of `wolfssl/openssl/`
are used to explicitly use wolfSSL includes. This fixes cmake builds as
well as avoiding potentially using openSSL headers since include path
order is not guaranteed.

Closes #8864

3 years agocurl: deprecate --random-file and --egd-file
Daniel Stenberg [Tue, 17 May 2022 09:06:07 +0000 (11:06 +0200)] 
curl: deprecate --random-file and --egd-file

As libcurl no longer has any functionality for them, the tool now does
nothing with them.

Closes #8670

3 years agoopts: deprecate RANDOM_FILE and EGDSOCKET
Daniel Stenberg [Tue, 17 May 2022 09:05:53 +0000 (11:05 +0200)] 
opts: deprecate RANDOM_FILE and EGDSOCKET

These two options were only ever used for the OpenSSL backend for
versions before 1.1.0. They were never used for other backends and they
are not used with recent OpenSSL versions. They were never used much by
applications.

The defines RANDOM_FILE and EGD_SOCKET can still be set at build-time
for ancient EOL OpenSSL versions.

Closes #8670

3 years agobindlocal: don't use a random port if port number would wrap
Harry Sintonen [Mon, 16 May 2022 19:18:04 +0000 (22:18 +0300)] 
bindlocal: don't use a random port if port number would wrap

Earlier if CURLOPT_LOCALPORT + CURLOPT_LOCALPORTRANGE would go past port
65535 the code would fall back to random port rather than giving up.

Closes #8862

3 years agotransfer: Fix potential NULL pointer dereference
Daniel Gustafsson [Mon, 16 May 2022 19:18:46 +0000 (21:18 +0200)] 
transfer: Fix potential NULL pointer dereference

Commit 0ef54abf5208 accidentally used the conn variable before the
assertion for it being NULL. Fix by moving the assignment which use
conn to after the assertion.

Closes: #8857
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agodocs: clarify data replacement policy for MIME API
Daniel Gustafsson [Mon, 16 May 2022 18:32:38 +0000 (20:32 +0200)] 
docs: clarify data replacement policy for MIME API

The API documentation for the MIME functions specify that the parts
can be set twice, with the last call winning.  While true, the user
can set the parts n times for n > 2, reword to specify multiple API
calls instead.

Closes: #8860
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agongtcp2: support boringssl crypto backend
vvb2060 on github [Tue, 3 May 2022 21:14:38 +0000 (05:14 +0800)] 
ngtcp2: support boringssl crypto backend

Closes #8789

3 years agoquic: add Curl_quic_idle
Tatsuhiro Tsujikawa [Tue, 12 Apr 2022 10:10:46 +0000 (19:10 +0900)] 
quic: add Curl_quic_idle

Add Curl_quic_idle which is called when no HTTP level read or write is
performed.  It is a good place to handle timer expiry for QUIC transport
(.e.g, retransmission).

Closes #8698

3 years agomprintf: ignore clang non-literal format string
Gregor Jasny [Sun, 24 Apr 2022 11:31:27 +0000 (13:31 +0200)] 
mprintf: ignore clang non-literal format string

Closes #8740

3 years agosectransp: check for a function defined when __BLOCKS__ is undefined
Nick Zitzmann [Sun, 15 May 2022 21:57:20 +0000 (16:57 -0500)] 
sectransp: check for a function defined when __BLOCKS__ is undefined

SecTrustEvaluateAsync() is defined in the macOS 10.7 SDK, but it
requires Grand Central Dispatch to be supported by the compiler, and
some third-party macOS compilers do not support Grand Central Dispatch.
SecTrustCopyPublicKey() is not present in macOS 10.6, so this shouldn't
adversely affect anything.

Fixes #8846
Reported-by: Egor Pugin
Closes #8854

3 years agotest412/413: Use version macro for User-Agent
Daniel Gustafsson [Mon, 16 May 2022 08:45:41 +0000 (10:45 +0200)] 
test412/413: Use version macro for User-Agent

Commit 46d45ea3a incorrectly hardcoded the User-Agent in the test
output file which breaks when curlver is updated. Shift to using
the %VERSION macro instead.

Closes: #8856
3 years agomacos9: remove partial support
Daniel Gustafsson [Mon, 16 May 2022 08:10:16 +0000 (10:10 +0200)] 
macos9: remove partial support

The support for compiling on Mac OS 9 hasn't been modified since 2001
and has no active maintainer or packager, so it's time to remove it as
it's incredibly unlikely to work. If a maintainer re-emerges it can be
resurrected from Git history.

Closes: #8836
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agotest1635: verify --fail-with-body with --retry
Daniel Stenberg [Mon, 16 May 2022 08:04:18 +0000 (10:04 +0200)] 
test1635: verify --fail-with-body with --retry

Almost a dupe of 1634

Closes #8847

3 years agotool_operate: make sure --fail-with-body works with --retry
Daniel Stenberg [Mon, 16 May 2022 08:04:05 +0000 (10:04 +0200)] 
tool_operate: make sure --fail-with-body works with --retry

... in the same way --fail already does.

Reported-by: Jakub Bochenski
Fixes #8845
Closes #8847

3 years agongtcp2: Correct use of ngtcp2 and nghttp3 signed integer types
Tatsuhiro Tsujikawa [Sun, 15 May 2022 03:38:57 +0000 (12:38 +0900)] 
ngtcp2: Correct use of ngtcp2 and nghttp3 signed integer types

Closes #8851

3 years agongtcp2: Fix alert_read_func return value
Tatsuhiro Tsujikawa [Sun, 15 May 2022 03:49:05 +0000 (12:49 +0900)] 
ngtcp2: Fix alert_read_func return value

Closes #8852

3 years agoCurl_parsenetrc: don't access local pwbuf outside of scope
Harry Sintonen [Sat, 14 May 2022 22:58:05 +0000 (01:58 +0300)] 
Curl_parsenetrc: don't access local pwbuf outside of scope

Accessing local variables outside of the scope is forbidden and
depending on the compiler can result in the value being
overwritten. Fixed by moving the pwbuf to be in scope.

Closes #8850

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 16 May 2022 07:23:21 +0000 (09:23 +0200)] 
RELEASE-NOTES: synced

and bump curlver to 7.83.2 for now (but likely to become 7.84.0 soon)

3 years agoci: update github actions
Frazer Smith [Sat, 14 May 2022 21:37:59 +0000 (23:37 +0200)] 
ci: update github actions

- bump actions/checkout from 2 to 3
- bump actions/upload-artifact from 1 to 3
- bump github/codeql-actions from 1 to 2
- use version tag for actions/checkout

Closes #8843

3 years agotest1919: verify CURLOPT_XOAUTH2_BEARER leak fix
Daniel Stenberg [Sat, 14 May 2022 16:04:52 +0000 (18:04 +0200)] 
test1919: verify CURLOPT_XOAUTH2_BEARER leak fix

3 years agourl: free old conn better on reuse
Daniel Stenberg [Sat, 14 May 2022 16:04:46 +0000 (18:04 +0200)] 
url: free old conn better on reuse

Make use of conn_free() better and avoid duplicate code.

Reported-by: Andrea Pappacoda
Fixes #8841
Closes #8842

3 years agoFAQ: Clarify Windows double quote usage
Jay Satiro [Mon, 9 May 2022 06:22:39 +0000 (02:22 -0400)] 
FAQ: Clarify Windows double quote usage

- Windows command prompt doesn't use literal quoting via single quotes.

- Windows command prompt inner double quotes are escaped with a
  backslash.

- Windows powershell does use single quotes but curl is not a powershell
  script so the arguments may not be passed on correctly.

- Windows powershell inner double quotes seems can be passed to curl if
  the outer quotes are double quotes and an escape of backslash-backtick
  is used.

Command prompt example:

~~~
getargs -v -d "\"a\""

argv[0]: getargs
argv[1]: -v
argv[2]: -d
argv[3]: "a"
~~~

Ref: https://github.com/curl/curl/issues/8818
Ref: https://gist.github.com/jay/19aba48653bd591cf4b90eb9249a302c

Reported-by: KotlinIsland@users.noreply.github.com
Closes https://github.com/curl/curl/pull/8823

3 years agogithub/workflows/nss: apt update first
Daniel Stenberg [Thu, 12 May 2022 14:46:09 +0000 (16:46 +0200)] 
github/workflows/nss: apt update first

Fix "libnss3-dev_3.49.1-1ubuntu1.6_amd64.deb 404 Not Found"

Closes #8837

3 years agopage-footer: mention exit code zero too
Daniel Stenberg [Thu, 12 May 2022 06:21:08 +0000 (08:21 +0200)] 
page-footer: mention exit code zero too

Success (zero) is also an "exit code" worth mentioning.

Closes #8833

3 years agogssapi: initialize gss_buffer_desc strings
Daniel Gustafsson [Thu, 12 May 2022 12:12:41 +0000 (14:12 +0200)] 
gssapi: initialize gss_buffer_desc strings

Explicitly initialize gss_buffer_desc strings such that a call to
freeing resources will succeed even if no data has been allocated
to it.

Reported-by: Jay Satiro <raysatiro@yahoo.com>
3 years agogssapi: improve handling of errors from gss_display_status
Daniel Gustafsson [Thu, 12 May 2022 12:11:52 +0000 (14:11 +0200)] 
gssapi: improve handling of errors from gss_display_status

In case gss_display_status() returns an error, avoid trying to add
it to the buffer as the message may well be a NULL pointer.

Originally this fix comes from a discussion in issue #8816.

Closes: #8832
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
3 years agohttp2: always debug print stream id in decimal with %u
steini2000 [Fri, 6 May 2022 14:07:31 +0000 (16:07 +0200)] 
http2: always debug print stream id in decimal with %u

Prior to this change the stream id shown could be hex or decimal which
was inconsistent and confusing.

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

3 years agourl: remove redundant #ifdefs in allocate_conn() 8835/head
Kamil Dudka [Wed, 11 May 2022 13:51:29 +0000 (15:51 +0200)] 
url: remove redundant #ifdefs in allocate_conn()

No change in behavior intended by this commit.

3 years agotests 266, 116 and 1540: add a small write delay
Fabian Keil [Wed, 11 May 2022 09:14:18 +0000 (11:14 +0200)] 
tests 266, 116 and 1540: add a small write delay

This makes it more likely that the trailer is received
seperately from the last-chunk.

curl doesn't seem to care about this but it makes the tests
more useful when testing external proxies like Privoxy.

3 years agotests 1117,1238,1523: adjust writedelay servercmds
Fabian Keil [Wed, 11 May 2022 09:14:18 +0000 (11:14 +0200)] 
tests 1117,1238,1523: adjust writedelay servercmds

... so the delays are the same now that the unit
is in milliseconds.

3 years agotests/server/sws.c: change the HTTP writedelay unit to milliseconds
Fabian Keil [Wed, 11 May 2022 09:14:18 +0000 (11:14 +0200)] 
tests/server/sws.c: change the HTTP writedelay unit to milliseconds

This allows to use write delays for large responses without
resulting in the test taking an unreasonable amount of time.

In many cases delaying writes by a whole second or more isn't
necessary for the desired effect.

Closes #8827

3 years agoaws-sigv4: fix potentional NULL pointer arithmetic
Daniel Gustafsson [Wed, 11 May 2022 08:52:56 +0000 (10:52 +0200)] 
aws-sigv4: fix potentional NULL pointer arithmetic

We need to check if the strchr() call returns NULL (due to missing
char) before we use the returned value in arithmetic.  There is no
live bug here, but fixing it before it can become for hygiene.

Closes: #8814
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoquiche: support ca-fallback
Daniel Stenberg [Tue, 10 May 2022 09:09:47 +0000 (11:09 +0200)] 
quiche: support ca-fallback

Follow-up to b01f3e679f4c1ea3 which added this for ngtcp2/openssl

Removed from KNOWN_BUGS

Fixes #8696
Closes #8830

3 years agox509asn1: mark msnprintf return as unchecked
Daniel Gustafsson [Wed, 11 May 2022 08:38:08 +0000 (10:38 +0200)] 
x509asn1: mark msnprintf return as unchecked

We have lots of unchecked msnprintf calls, and this particular msnprintf
call isn't more interesting than the others, but this one yields a Coverity
warning so let's implicitly silence it. Going over the other invocations
is probably a worthwhile project, but for now let's keep the static
analyzers happy.

Closes: #8831
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoRELEASE-NOTES: synced curl-7_83_1
Daniel Stenberg [Wed, 11 May 2022 06:11:15 +0000 (08:11 +0200)] 
RELEASE-NOTES: synced

curl 7.83.1 release

3 years agoTHANKS: added contributors from 7.83.1
Daniel Stenberg [Wed, 11 May 2022 06:11:14 +0000 (08:11 +0200)] 
THANKS: added contributors from 7.83.1

3 years agozuul: fix the ngtcp2-gnutls build
Daniel Stenberg [Tue, 10 May 2022 07:33:02 +0000 (09:33 +0200)] 
zuul: fix the ngtcp2-gnutls build

Add packages and tweak the configure options.

Use the GnuTLS 3.7.4 branch (not main).

Closes #8829

3 years agongtcp2: add ca-fallback support for OpenSSL backend
Tatsuhiro Tsujikawa [Mon, 9 May 2022 12:21:32 +0000 (21:21 +0900)] 
ngtcp2: add ca-fallback support for OpenSSL backend

Closes #8828

3 years agourl: check SSH config match on connection reuse
Daniel Stenberg [Mon, 9 May 2022 21:13:53 +0000 (23:13 +0200)] 
url: check SSH config match on connection reuse

CVE-2022-27782

Reported-by: Harry Sintonen
Bug: https://curl.se/docs/CVE-2022-27782.html
Closes #8825

3 years agotls: check more TLS details for connection reuse
Daniel Stenberg [Mon, 9 May 2022 21:13:53 +0000 (23:13 +0200)] 
tls: check more TLS details for connection reuse

CVE-2022-27782

Reported-by: Harry Sintonen
Bug: https://curl.se/docs/CVE-2022-27782.html
Closes #8825

3 years agocookies: make bad_domain() not consider a trailing dot fine
Daniel Stenberg [Mon, 9 May 2022 14:47:06 +0000 (16:47 +0200)] 
cookies: make bad_domain() not consider a trailing dot fine

The check for a dot in the domain must not consider a single trailing
dot to be fine, as then TLD + trailing dot is fine and curl will accept
setting cookies for it.

CVE-2022-27779

Reported-by: Axel Chong
Bug: https://curl.se/docs/CVE-2022-27779.html
Closes #8820

3 years agotest977: reproduce ability to set cookie on TLD
Daniel Stenberg [Mon, 9 May 2022 14:47:06 +0000 (16:47 +0200)] 
test977: reproduce ability to set cookie on TLD

When PSL is not enabled

3 years agoscripts/contributors.sh: correct the copyright range
Daniel Stenberg [Mon, 9 May 2022 14:41:57 +0000 (16:41 +0200)] 
scripts/contributors.sh: correct the copyright range

3 years agodocs/RELEASE-PROCEDURE.md: refreshed and adjsuted the release dates
Daniel Stenberg [Mon, 9 May 2022 14:25:16 +0000 (16:25 +0200)] 
docs/RELEASE-PROCEDURE.md: refreshed and adjsuted the release dates

3 years agotest379: verify --remove-on-error with --no-clobber
Daniel Stenberg [Mon, 9 May 2022 10:56:30 +0000 (12:56 +0200)] 
test379: verify --remove-on-error with --no-clobber

3 years agopost_per_transfer: remove the updated file name
Daniel Stenberg [Mon, 9 May 2022 10:56:21 +0000 (12:56 +0200)] 
post_per_transfer: remove the updated file name

When --remove-on-error is used with --no-clobber, it might have an
updated file name to remove.

Bug: https://curl.se/docs/CVE-2022-27778.html

CVE-2022-27778

Reported-by: Harry Sintonen
Closes #8824

3 years agohsts: ignore trailing dots when comparing hosts names
Daniel Stenberg [Mon, 9 May 2022 06:13:55 +0000 (08:13 +0200)] 
hsts: ignore trailing dots when comparing hosts names

CVE-2022-30115

Reported-by: Axel Chong
Bug: https://curl.se/docs/CVE-2022-30115.html
Closes #8821

3 years agotest440/441: verify HSTS with trailing dots
Daniel Stenberg [Mon, 9 May 2022 06:13:54 +0000 (08:13 +0200)] 
test440/441: verify HSTS with trailing dots

3 years agolibtest/lib1560: verify the host name percent decode fix
Daniel Stenberg [Mon, 9 May 2022 06:19:38 +0000 (08:19 +0200)] 
libtest/lib1560: verify the host name percent decode fix

3 years agourlapi: reject percent-decoding host name into separator bytes
Daniel Stenberg [Mon, 9 May 2022 06:19:38 +0000 (08:19 +0200)] 
urlapi: reject percent-decoding host name into separator bytes

CVE-2022-27780

Reported-by: Axel Chong
Bug: https://curl.se/docs/CVE-2022-27780.html
Closes #8826

3 years agonss: return error if seemingly stuck in a cert loop
Daniel Stenberg [Mon, 9 May 2022 08:07:15 +0000 (10:07 +0200)] 
nss: return error if seemingly stuck in a cert loop

CVE-2022-27781

Reported-by: Florian Kohnhäuser
Bug: https://curl.se/docs/CVE-2022-27781.html
Closes #8822

3 years agotest412/413: verify alt-svc with trailing dots
Daniel Stenberg [Mon, 9 May 2022 07:39:22 +0000 (09:39 +0200)] 
test412/413: verify alt-svc with trailing dots

3 years agoaltsvc: fix host name matching for trailing dots
Daniel Stenberg [Mon, 9 May 2022 07:39:15 +0000 (09:39 +0200)] 
altsvc: fix host name matching for trailing dots

Closes #8819

3 years agohyper: fix test 357
Garrett Squire [Sat, 7 May 2022 00:34:14 +0000 (17:34 -0700)] 
hyper: fix test 357

This change fixes the hyper API such that PUT requests that receive a
417 response can retry without the Expect header.

Closes #8811

3 years agosectransp: bail out if SSLSetPeerDomainName fails
Harry Sintonen [Fri, 6 May 2022 14:25:19 +0000 (16:25 +0200)] 
sectransp: bail out if SSLSetPeerDomainName fails

Before the code would just warn about SSLSetPeerDomainName() errors.

Closes #8798

3 years agohttp_proxy/hyper: handle closed connections
Daniel Stenberg [Fri, 6 May 2022 08:00:24 +0000 (10:00 +0200)] 
http_proxy/hyper: handle closed connections

Enable test 1021 for hyper builds.

Patched-by: Prithvi MK
Fixes #8700
Closes #8806

3 years agoKNOWN_BUGS: timeout when reusing a http3 connection
Daniel Stenberg [Fri, 6 May 2022 07:20:18 +0000 (09:20 +0200)] 
KNOWN_BUGS: timeout when reusing a http3 connection

Closes #8764

3 years agoKNOWN_BUGS: configure --with-ca-fallback is not supported by h3
Daniel Stenberg [Fri, 6 May 2022 07:15:46 +0000 (09:15 +0200)] 
KNOWN_BUGS: configure --with-ca-fallback is not supported by h3

Closes #8696

3 years agoMakefile: fix "make ca-firefox"
Ryan Schmidt [Thu, 5 May 2022 13:43:52 +0000 (08:43 -0500)] 
Makefile: fix "make ca-firefox"

Closes #8804

3 years agotests: fix markdown formatting in README
Daniel Gustafsson [Thu, 5 May 2022 14:43:38 +0000 (16:43 +0200)] 
tests: fix markdown formatting in README

The asterisk in the abbreviation *NIX (for UNIX/Linux) needs to be
escaped to not mean start of italic formatting. This is consistent
with docs/RELEASE-PROCEDURE.md.

Closes: #8802
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoTODO: expand on "Expose tried IP addresses that failed"
Daniel Stenberg [Thu, 5 May 2022 11:56:50 +0000 (13:56 +0200)] 
TODO: expand on "Expose tried IP addresses that failed"

Ref: #8794

3 years agotests/server: declare variable 'reqlogfile' static
Fabian Keil [Thu, 5 May 2022 09:53:08 +0000 (11:53 +0200)] 
tests/server: declare variable 'reqlogfile' static

Silences the warning:

     CC       socksd-socksd.o
   socksd.c:143:13: warning: no previous extern declaration for
    non-static variable 'reqlogfile' [-Wmissing-variable-declarations]
   const char *reqlogfile = DEFAULT_REQFILE;
               ^
   socksd.c:143:7: note: declare 'static' if the variable is not
    intended to be used outside of this translation unit
   const char *reqlogfile = DEFAULT_REQFILE;
         ^
   1 warning generated.

... when compiling with clang 13.

Closes: #8799
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
3 years agoHTTP-COOKIES: add missing CURLOPT_COOKIESESSION
Daniel Gustafsson [Thu, 5 May 2022 09:51:07 +0000 (11:51 +0200)] 
HTTP-COOKIES: add missing CURLOPT_COOKIESESSION

Commit 980a47b42 added support for ignoring session cookies, but it
was never added to the documentation.

Closes: #8795
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agodocs/THANKS: remove name duplicate
Daniel Stenberg [Thu, 5 May 2022 08:25:56 +0000 (10:25 +0200)] 
docs/THANKS: remove name duplicate

3 years ago.mailmap: update
Philip H [Thu, 5 May 2022 08:03:33 +0000 (10:03 +0200)] 
.mailmap: update

Closes #8800

3 years agombedtls: fix some error messages
Jay Satiro [Thu, 5 May 2022 07:13:24 +0000 (03:13 -0400)] 
mbedtls: fix some error messages

Prior to this change some of the error messages misidentified the
function that failed.

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 5 May 2022 06:48:17 +0000 (08:48 +0200)] 
RELEASE-NOTES: synced

3 years agox509asn1: make do_pubkey handle EC public keys
Sergey Markelov [Thu, 5 May 2022 06:44:21 +0000 (08:44 +0200)] 
x509asn1: make do_pubkey handle EC public keys

Closes #8757

3 years agombedtls: bail out if rng init fails
Harry Sintonen [Wed, 4 May 2022 23:23:16 +0000 (02:23 +0300)] 
mbedtls: bail out if rng init fails

There was a failf() call but no actual error return.

Closes #8796

3 years agourlapi: address (harmless) UndefinedBehavior sanitizer warning
Sergey Markelov [Thu, 5 May 2022 00:22:19 +0000 (17:22 -0700)] 
urlapi: address (harmless) UndefinedBehavior sanitizer warning

`while(i--)` causes runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'size_t' (aka 'unsigned long')

Closes #8797

3 years agotest{898,974,976}: add 'HTTP proxy' keywords
Fabian Keil [Mon, 25 Apr 2022 12:08:15 +0000 (14:08 +0200)] 
test{898,974,976}: add 'HTTP proxy' keywords

... so the tests can be automatically skipped when
testing external HTTP proxies like Privoxy.

Closes #8791

3 years agogskit_connect_step1: fixed bogus setsockopt calls
Harry Sintonen [Wed, 4 May 2022 21:33:17 +0000 (23:33 +0200)] 
gskit_connect_step1: fixed bogus setsockopt calls

setsockopt takes a reference to value, not value. With the current
code this just leads to -1 return value with errno EFAULT.

Closes #8793

3 years agoCURLOPT_SSH_AUTH_TYPES.3: fix the default
Daniel Stenberg [Wed, 4 May 2022 21:31:24 +0000 (23:31 +0200)] 
CURLOPT_SSH_AUTH_TYPES.3: fix the default

The default is all possible methods.

Closes #8792

3 years agoCURLOPT_DOH_URL.3: mention the known bug
Daniel Stenberg [Wed, 4 May 2022 12:44:14 +0000 (14:44 +0200)] 
CURLOPT_DOH_URL.3: mention the known bug

It is mostly duplicating info from KNOWN_BUGS but make it easier to find
for users of this option.

Closes #8790