Commit Graph

30384 Commits

Author SHA1 Message Date
Emanuele Torre
fbe23b5797
docs: document that curl_url_cleanup(NULL) is a safe no-op
This has always been the case, but it was not documented.

The paragraph was copied verbatim from curl_easy_cleanup.3

Closes #11150
2023-05-19 16:18:21 +02:00
Antoine Pitrou
d65321f939
select: avoid returning an error on EINTR from select() or poll()
This was already done for the poll() and select() calls
made directly from Curl_poll(), but was missed in
Curl_wait_ms(), which is called when there are no fds
to wait on.

Fixes #11135
Closes #11143
2023-05-19 16:16:26 +02:00
Daniel Stenberg
5b4bcc6ede
vquic.c: make recvfrom_packets static, avoid compiler warning
warning: no previous prototype for 'recvfrom_packets'

Reported-by: Keitagit-kun on github
Fixes #11146
Closes #11148
2023-05-19 16:15:22 +02:00
Daniel Stenberg
92772e6d39
urlapi: allow numerical parts in the host name
It can only be an IPv4 address if all parts are all digits and no more than
four parts, otherwise it is a host name. Even slightly wrong IPv4 will now be
passed through as a host name.

Regression from 17a15d8846 shipped in 8.1.0

Extended test 1560 accordingly.

Reported-by: Pavel Kalyugin
Fixes #11129
Closes #11131
2023-05-19 16:01:26 +02:00
Emilio Cobos Álvarez
77c9a9845b
http2: double http request parser max line length
This works around #11138, by doubling the limit, and should be a
relatively safe fix.

Ideally the buffer would grow as needed and there would be no need for a
limit? But that might be follow-up material.

Fixes #11138
Closes #11139
2023-05-19 01:09:36 +02:00
Emanuele Torre
81f3c4bc65
configure: fix --help alignment
AC_ARG_ENABLE seems to only trim off whitespace from the start and end
of its help-string argument, while prepending two spaces of indentation
to all lines.

This means that the two spaces of indentation between the --enable-rtsp
and the --disable-rtsp line were not removed causing ./configure --help
to print:

  Optional Features:
    [...]
    --enable-rtsp           Enable RTSP support
      --disable-rtsp          Disable RTSP support

I removed the indentation to fix the issue, now it prints:

  Optional Features:
    [...]
    --enable-rtsp           Enable RTSP support
    --disable-rtsp          Disable RTSP support

The --enable-hsts and --disable-hsts lines had the same problems, and
have been fixed too.

Closes #11142
2023-05-18 23:49:07 +02:00
Deal(一线灵)
446061e6cb
cmake: repair cross compiling
It cannot *run* code for testing purposes when cross-compiling.

Closes #11130
2023-05-18 21:13:12 +02:00
Daniel Stenberg
b78ca50cb3
configure: generate a script to run the compiler
in the CURL_RUN_IFELSE macro, with LD_LIBRARY_PATH set to the value of
the configure invoke, and not the value that might be used later,
intended for the execution of the output the compiler ouputs.

For example when the compiler uses the same library (like libz) that
configure checks for.

Reported-by: Jonas Bülow
Fixes #11114
Closes #11120
2023-05-18 20:57:11 +02:00
Stefan Eissing
408eb87bb3
cf-socket: completely remove the disabled USE_RECV_BEFORE_SEND_WORKAROUND
Closes #11118
2023-05-18 20:55:16 +02:00
Emanuele Torre
df6c2f7b54
urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects
curl_url_set(uh, CURLUPART_URL, redirurl, flags)  was not respecing
CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY in the host part of redirurl
when redirecting to an absolute URL.

Closes #11136
2023-05-18 20:52:59 +02:00
Colin Cross
e743425bc6
hostip: move easy_lock.h include above curl_memory.h
Similar to #9561, move easy_lock.h above curl_memory.h to fix building
against musl libc.

Closes #11140
2023-05-18 20:50:22 +02:00
Hind Montassif
de522c55ba
curl_easy_getinfo: clarify on return data types
Closes #11126
2023-05-18 20:46:36 +02:00
Emanuele Torre
f198d33e8d
checksrc: disallow spaces before labels
Out of 415 labels throughout the code base, 86 of those labels were
not at the start of the line. Which means labels always at the start of
the line is the favoured style overall with 329 instances.

Out of the 86 labels not at the start of the line:
* 75 were indented with the same indentation level of the following line
* 8 were indented with exactly one space
* 2 were indented with one fewer indentation level then the following
  line
* 1 was indented with the indentation level of the following line minus
  three space (probably unintentional)

Co-Authored-By: Viktor Szakats

Closes #11134
2023-05-18 20:45:04 +02:00
Daniel Stenberg
d334b02924
cookie: update the comment on cookie length and size limits
To refer to the proper cookie RFC and the upcoming RFC refresh.

Closes #11127
2023-05-18 20:43:25 +02:00
Daniel Stenberg
f1e5d8a731
url: provide better error message when URLs fail to parse
By providing the URL API error message into the error message.

Ref: #11129
Closes #11137
2023-05-18 20:42:17 +02:00
Daniel Stenberg
88ba931daa
RELEASE-NOTES: synced
bumped to 8.1.1
2023-05-18 13:45:54 +02:00
jonrumsey
9438bd26af
os400: update chkstrings.c
Compensate changes for recent changes to urldata.h to reclassify
STRING_AWS_SIGV4.

Fixes #11132
Closes #11133
2023-05-18 12:11:02 +02:00
Daniel Stenberg
a9f8fe2848
RELEASE-NOTES: synced 2023-05-17 08:06:02 +02:00
Daniel Stenberg
9566875eef
THANKS: contributors from the 8.1.0 release 2023-05-17 08:05:04 +02:00
Daniel Stenberg
f446258f02
hostip: include easy_lock.h before using GLOBAL_INIT_IS_THREADSAFE
Since that header file is the only place that define can be defined.

Reported-by: Marc Deslauriers

Follow-up to 13718030ad

Closes #11121
2023-05-17 08:03:10 +02:00
Thomas Taylor
ec91b9c08f
aws-sigv4.d: fix region identifier in example
Closes #11117
2023-05-16 08:25:21 +02:00
Philip H
0773d2a956
mlc_config.json: remove this linkcheck CI job config file
Closes #11113
2023-05-15 13:23:54 +02:00
Daniel Silverstone
e915b6904c
ssh: Add support for libssh2 read timeout
Hook the new (1.11.0 or newer) libssh2 support for setting a read timeout
into the SERVER_RESPONSE_TIMEOUT option.  With this done, clients can use
the standard curl response timeout setting to also control the time that
libssh2 will wait for packets from a slow server.  This is necessary to
enable use of very slow SFTP servers.

Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>

Closes #10965
2023-05-15 13:20:47 +02:00
Osama Albahrani
f157610d30
GIT-INFO: add --with-openssl
Closes #11110
2023-05-14 23:22:23 +02:00
Daniel Stenberg
4f17d434e9
RELEASE-NOTES: synced 2023-05-13 21:03:59 +02:00
Marcel Raad
2a154560c0
md(4|5): don't use deprecated iOS functions
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Bug: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102
2023-05-13 09:57:54 +02:00
Marcel Raad
e587598534
md4: only build when used
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102
2023-05-13 09:57:35 +02:00
Vítor Galvão
de2542f3f2
write-out.d: Use response_code in example
Closes #11107
2023-05-12 23:19:19 +02:00
Shohei Maeda
ac5ad52142
url: fix null dispname for --connect-to option
Closes #11106
2023-05-12 17:52:07 +02:00
Daniel Stenberg
efa6c644aa
test2306: verify getting a second response with folded headers
Reproduces the isue #11101 and verifies the fix.

Verifies a17b2a503f
2023-05-12 17:50:33 +02:00
Daniel Stenberg
cd1c611b24
headers: clear (possibly) lingering pointer in init
The "prevhead" pointer is used for the headers storage but was not
cleared correctly in init, which made it possible to act up when a
handle is reused.

Reported-by: Steve Herrell
Fixes #11101
Closes #11103
2023-05-12 17:48:20 +02:00
Daniel Stenberg
5338a41056
RELEASE-NOTES: synced 2023-05-12 17:30:51 +02:00
Daniel Stenberg
10998e3b89
ngtcp2: use 0.15.0
- nghttp3 0.11.0
- nghttp2 1.53.0

Adapt to new API calls

Closes #11031
2023-05-12 17:25:38 +02:00
Jay Satiro
2cc1c93f45 openssl: fix indent 2023-05-10 14:03:30 -04:00
Daniel Stenberg
89756e87ee
CURLOPT_DNS_CACHE_TIMEOUT.3: fix spelling
Follow-up to 9ed7d56e04

Closes #11096
2023-05-10 00:24:14 +02:00
Daniel Stenberg
8e6abece40
hostip: use time_t for storing oldest DNS entry
Theoretically, the oldest time could overflow an int. In practice that
won't happen, but let's do this to please analyzers.

Follow-up to 9ed7d56e04

Pointed out by Coverity.
Closes #11094
2023-05-09 17:56:19 +02:00
Daniel Stenberg
f7170a8f2e
http: free the url before storing a new copy
To avoid a memory-leak.

Reported-by: Hiroki Kurosawa

Closes #11093
2023-05-09 09:47:30 +02:00
Daniel Stenberg
6708498588
compressed.d: clarify the words on "not notifying headers"
Reported-by: Dylan Anthony
Fixes #11091
Closes #11092
2023-05-09 09:20:12 +02:00
Daniel Stenberg
8e21b1a05f
libssh2: free fingerprint better
Reported-by: Wei Chong Tan
Closes #11088
2023-05-08 16:47:03 +02:00
Daniel Stenberg
5d36bdf490
CURLOPT_IPRESOLVE.3: clarify that this for host names, not IP addresses
Reported-by: Harry Sintonen
Closes #11087
2023-05-08 14:58:05 +02:00
Daniel Stenberg
9ed7d56e04
hostip: enforce a maximum DNS cache size independent of timeout value
To reduce the damage an application can cause if using -1 or other
ridiculous timeout values and letting the cache live long times.

The maximum number of entries in the DNS cache is now totally
arbitrarily and hard-coded set to 29999.

Closes #11084
2023-05-08 14:55:26 +02:00
Daniel Stenberg
f62557276a
hostip: store dns timeout as 'int'
... because it set and held as an 'int' elsewhere and can never be
larger.
2023-05-08 14:55:19 +02:00
Daniel Stenberg
86535e30af
RELEASE-NOTES: synced 2023-05-08 14:41:11 +02:00
Daniel Stenberg
39a33fcac0
tool_operate: refuse (--data or --form) and --continue-at combo
libcurl assumes that a --continue-at resumption is done to continue an
upload using the read callback and neither --data nor --form use
that and thus won't do what the user wants. Whatever the user wants
with this strange combination.

Add test 426 to verify.

Reported-by: Smackd0wn on github
Fixes #11081
Closes #11083
2023-05-08 14:10:44 +02:00
Daniel Stenberg
fb7886b9c9
transfer: refuse POSTFIELDS + RESUME_FROM combo
The code assumes that such a resume is wanting to continue an upload
using the read callback, and since POSTFIELDS is done without callback
libcurl will just misbehave.

This combo will make the transfer fail with CURLE_BAD_FUNCTION_ARGUMENT
with an explanation in the error message.

Reported-by: Smackd0wn on github
Fixes #11081
Closes #11083
2023-05-08 14:10:34 +02:00
Daniel Stenberg
39434db41f
ipv4.d/ipv6.d: they are "mutex", not "boolean"
... which for example means they do not have --no-* versions.

Reported-by: Harry Sintonen
Fixes #11085
Closes #11086
2023-05-08 14:09:40 +02:00
Daniel Stenberg
5a7ae421c5
docs/SECURITY-ADVISORY.md: how to write a curl security advisory
Closes #11080
2023-05-08 09:40:29 +02:00
nobedee on github
62ba84a2ab
MANUAL.md: add dict example for looking up a single definition
Closes #11077
2023-05-05 23:49:25 +02:00
Dan Fandrich
3d75029859 runtests: fix -c option when run with valgrind
The curl binary argument wasn't being quoted properly. This seems to
have broken at some point after quoting was added in commit 606b29fe.

Reported-by: Daniel Stenberg
Ref: #11073
Fixes #11074
Closes #11076
2023-05-05 09:52:38 -07:00
Dan Fandrich
faebcee349 runtests: support creating more than one runner process
The controller currently only creates and uses one, but more are now
possible.

Ref: #10818
2023-05-05 00:45:43 -07:00