Commit Graph

28612 Commits

Author SHA1 Message Date
Daniel Stenberg
9ec22e4fe6
test414: verify secure cookie domain overlay 2022-05-19 14:48:26 +02:00
Harry Sintonen
e9a8451a3b
cookie: address secure domain overlay
Bug: https://hackerone.com/reports/1560324
Co-authored-by: Daniel Stenberg
Closes #8840
2022-05-19 14:48:26 +02:00
Frank Gevaerts
b12c2b91df
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
2022-05-19 12:03:57 +02:00
Daniel Stenberg
435acbd379
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
2022-05-19 11:14:54 +02:00
Daniel Stenberg
0842936292
lib/vssh/wolfssh.h: removed
Unused header file

Reported-by: Illarion Taev
Fixes #8863
Closes #8866
2022-05-17 17:31:02 +02:00
Elms
835a205370
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
2022-05-17 16:58:03 +02:00
Daniel Stenberg
84052154f7
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
2022-05-17 11:06:07 +02:00
Daniel Stenberg
8d86718f3f
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
2022-05-17 11:05:54 +02:00
Harry Sintonen
1b3dcaed9f
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
2022-05-17 08:53:25 +02:00
Daniel Gustafsson
542c78dda7 transfer: Fix potential NULL pointer dereference
Commit 0ef54abf52 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>
2022-05-16 21:18:46 +02:00
Daniel Gustafsson
2df67e93c3 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>
2022-05-16 20:32:38 +02:00
vvb2060 on github
adde9f0e8c
ngtcp2: support boringssl crypto backend
Closes #8789
2022-05-16 18:21:54 +02:00
Tatsuhiro Tsujikawa
6fcd3e6f51
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
2022-05-16 18:19:08 +02:00
Gregor Jasny
53678992d5
mprintf: ignore clang non-literal format string
Closes #8740
2022-05-16 18:18:12 +02:00
Nick Zitzmann
e0b43c8eb9
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
2022-05-16 18:15:04 +02:00
Daniel Gustafsson
d17db5713a 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
2022-05-16 10:45:41 +02:00
Daniel Gustafsson
bf327a9dfe 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>
2022-05-16 10:10:16 +02:00
Daniel Stenberg
3ead914303
test1635: verify --fail-with-body with --retry
Almost a dupe of 1634

Closes #8847
2022-05-16 10:04:21 +02:00
Daniel Stenberg
0356804d13
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
2022-05-16 10:04:06 +02:00
Tatsuhiro Tsujikawa
5980068c87
ngtcp2: Correct use of ngtcp2 and nghttp3 signed integer types
Closes #8851
2022-05-16 10:02:50 +02:00
Tatsuhiro Tsujikawa
33e819d799
ngtcp2: Fix alert_read_func return value
Closes #8852
2022-05-16 09:57:37 +02:00
Harry Sintonen
8540f95444
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
2022-05-16 09:56:26 +02:00
Daniel Stenberg
64a4bb6cc8
RELEASE-NOTES: synced
and bump curlver to 7.83.2 for now (but likely to become 7.84.0 soon)
2022-05-16 09:23:21 +02:00
Frazer Smith
bda0d5fb84
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
2022-05-14 23:37:59 +02:00
Daniel Stenberg
5227367903
test1919: verify CURLOPT_XOAUTH2_BEARER leak fix 2022-05-14 18:05:20 +02:00
Daniel Stenberg
06d12105c7
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
2022-05-14 18:05:20 +02:00
Jay Satiro
a61eac6248 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
2022-05-14 02:38:58 -04:00
Daniel Stenberg
d56270cb30
github/workflows/nss: apt update first
Fix "libnss3-dev_3.49.1-1ubuntu1.6_amd64.deb 404 Not Found"

Closes #8837
2022-05-12 23:30:47 +02:00
Daniel Stenberg
1ddc8aefb2
page-footer: mention exit code zero too
Success (zero) is also an "exit code" worth mentioning.

Closes #8833
2022-05-12 16:26:20 +02:00
Daniel Gustafsson
f1cdeff37a 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>
2022-05-12 14:12:41 +02:00
Daniel Gustafsson
7360f9a565 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>
2022-05-12 14:11:52 +02:00
steini2000
f9bc378ab7 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
2022-05-12 01:31:32 -04:00
Kamil Dudka
9494cdc3d2 url: remove redundant #ifdefs in allocate_conn()
No change in behavior intended by this commit.
2022-05-11 15:51:29 +02:00
Fabian Keil
75e9035921
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.
2022-05-11 11:14:18 +02:00
Fabian Keil
9e6ec8b6d5
tests 1117,1238,1523: adjust writedelay servercmds
... so the delays are the same now that the unit
is in milliseconds.
2022-05-11 11:14:18 +02:00
Fabian Keil
fc3a0a872f
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
2022-05-11 11:14:18 +02:00
Daniel Gustafsson
37f892fb8c 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>
2022-05-11 10:52:56 +02:00
Daniel Stenberg
fdb5e21b4d
quiche: support ca-fallback
Follow-up to b01f3e679f which added this for ngtcp2/openssl

Removed from KNOWN_BUGS

Fixes #8696
Closes #8830
2022-05-11 10:49:31 +02:00
Daniel Gustafsson
bcf03dd213 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>
2022-05-11 10:38:08 +02:00
Daniel Stenberg
462196e6b4
RELEASE-NOTES: synced
curl 7.83.1 release
2022-05-11 08:11:15 +02:00
Daniel Stenberg
7fb6c9ba8f
THANKS: added contributors from 7.83.1 2022-05-11 08:11:14 +02:00
Daniel Stenberg
3be1e9c642
zuul: fix the ngtcp2-gnutls build
Add packages and tweak the configure options.

Use the GnuTLS 3.7.4 branch (not main).

Closes #8829
2022-05-10 09:44:00 +02:00
Tatsuhiro Tsujikawa
b01f3e679f
ngtcp2: add ca-fallback support for OpenSSL backend
Closes #8828
2022-05-10 09:43:08 +02:00
Daniel Stenberg
1645e9b445
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
2022-05-09 23:13:53 +02:00
Daniel Stenberg
f18af4f874
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
2022-05-09 23:13:53 +02:00
Daniel Stenberg
7e92d12b4e
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
2022-05-09 16:47:28 +02:00
Daniel Stenberg
f8cb6c610a
test977: reproduce ability to set cookie on TLD
When PSL is not enabled
2022-05-09 16:47:28 +02:00
Daniel Stenberg
447873dd4c
scripts/contributors.sh: correct the copyright range 2022-05-09 16:41:57 +02:00
Daniel Stenberg
22c4ecee7c
docs/RELEASE-PROCEDURE.md: refreshed and adjsuted the release dates 2022-05-09 16:25:16 +02:00
Daniel Stenberg
43cec1d4f8
test379: verify --remove-on-error with --no-clobber 2022-05-09 12:56:30 +02:00