Commit Graph

31442 Commits

Author SHA1 Message Date
Viktor Szakats
ede2e812c2
tidy-up: whitespace
Closes #12484
2023-12-08 03:28:50 +00:00
Stefan Eissing
ca6bafce95
test_02_download: fix paramters to test_02_27
- it is a special client that only ever uses http/2

Closes #12467
2023-12-07 09:32:46 +01:00
MAntoniak
4dbc7acc19
vtls: remove the Curl_cft_ssl_proxy object if CURL_DISABLE_PROXY
Closes #12459
2023-12-07 09:31:05 +01:00
Daniel Stenberg
7309b9cbbf
lib: strndup/memdup instead of malloc, memcpy and null-terminate
- bufref: use strndup
 - cookie: use strndup
 - formdata: use strndup
 - ftp: use strndup
 - gtls: use aprintf instead of malloc + strcpy * 2
 - http: use strndup
 - mbedtls: use strndup
 - md4: use memdup
 - ntlm: use memdup
 - ntlm_sspi: use strndup
 - pingpong: use memdup
 - rtsp: use strndup instead of malloc, memcpy and null-terminate
 - sectransp: use strndup
 - socks_gssapi.c: use memdup
 - vtls: use dynbuf instead of malloc, snprintf and memcpy
 - vtls: use strdup instead of malloc + memcpy
 - wolfssh: use strndup

Closes #12453
2023-12-07 08:47:44 +01:00
Daniel Stenberg
63cdaefbc3
strdup: remove the memchr check from Curl_strndup
It makes it possible to clone a binary chunk of data.

Closes #12453
2023-12-07 08:47:28 +01:00
Daniel Stenberg
c0dd06ecb3
ftp: handle the PORT parsing without allocation
Also reduces amount of *cpy() calls.

Closes #12456
2023-12-07 08:46:22 +01:00
Daniel Stenberg
f899e91431
RELEASE-NOTES: synced
Bumped to 8.5.1
2023-12-06 23:23:06 +01:00
Daniel Stenberg
45cf4755e7
url: for disabled protocols, mention if found in redirect
To help users better understand where the URL (and denied scheme) comes
from. Also removed "in libcurl" from the message, since the disabling
can be done by the application.

The error message now says "not supported" or "disabled" depending on
why it was denied:

 Protocol "hej" not supported
 Protocol "http" disabled

And in redirects:

 Protocol "hej" not supported (in redirect)
 Protocol "http" disabled (in redirect)

Reported-by: Mauricio Scheffer
Fixes #12465
Closes #12469
2023-12-06 23:05:21 +01:00
Stefan Eissing
8b99e6f23f
sectransp_ make TLSCipherNameForNumber() available in non-verbose config
Reported-by: Cajus Pollmeier
Closes #12476
Fixes #12474
2023-12-06 23:03:35 +01:00
YX Hao
a17f041bea
lib: fix variable undeclared error caused by infof changes
`--disable-verbose` yields `CURL_DISABLE_VERBOSE_STRINGS` defined.
`infof` isn't `Curl_nop_stmt` anymore: dac293c.

Follow-up to dac293c

Closes #12470
2023-12-06 23:01:54 +01:00
Viktor Szakats
8b76591b6b
tidy-up: fix yamllint whitespace issues in labeler.yml
Follow-up to bda2129114 #12466

Reviewed-by: Dan Fandrich
Closes #12475
2023-12-06 20:33:04 +00:00
Viktor Szakats
bda2129114
tidy-up: fix yamllint whitespace issues
Closes #12466
2023-12-06 17:25:59 +00:00
Chris Sauer
a2e75af3fb
cmake: fix typo
Follow-up to aace27b
Closes #12464
2023-12-06 13:13:41 +01:00
Daniel Stenberg
da8c1d1578
dist: add tests/errorcodes.pl to the tarball
Used by test 1477

Reported-by: Xi Ruoyao
Follow-up to 0ca3a4ec9a
Fixes #12462
Closes #12463
2023-12-06 11:28:41 +01:00
Dan Fandrich
ee2e8bfa36 github/labeler: update a missed key in the v5 upgrade
Follow-up to ce03fe3ba
2023-12-06 00:59:53 -08:00
Daniel Stenberg
7161cb17c0
RELEASE-NOTES: synced
The curl 8.5.0 release.
2023-12-06 08:11:44 +01:00
Dan Fandrich
ce03fe3bae github/labeler: switch from the beta to labeler v5
Some keys were renamed and the dot option was made default.

Closes #12458
2023-12-05 13:30:35 -08:00
Daniel Stenberg
04540f69cf
DEPRECATE: remove NTLM_WB in June 2024
Ref: https://curl.se/mail/lib-2023-12/0010.html

Closes #12451
2023-12-05 08:02:59 +01:00
Jacob Hoffman-Andrews
ad040e1262
rustls: implement connect_blocking
Closes #11647
2023-12-04 23:03:45 +01:00
Daniel Stenberg
79147a76cd
examples/rtsp-options.c: add
Just a bare bones RTSP example using CURLOPT_RTSP_SESSION_ID and
CURLOPT_RTSP_REQUEST set to CURL_RTSPREQ_OPTIONS.

Closes #12452
2023-12-04 22:35:38 +01:00
Stefan Eissing
0fbbc80b24
ngtcp2: ignore errors on unknown streams
- expecially in is_alive checks on connections, we might
  see incoming packets on streams already forgotten and closed,
  leading to errors reported by nghttp3. Ignore those.

Closes #12449
2023-12-04 12:57:24 +01:00
Daniel Stenberg
cb521d1f9a
docs: make all examples in all libcurl man pages compile
Closes #12448
2023-12-04 10:50:42 +01:00
Daniel Stenberg
3c4fba8cf5
checksrc.pl: support #line instructions
makes it identify the correct source file and line
2023-12-04 10:50:42 +01:00
Daniel Stenberg
8dbcdc8c09
GHA/man-examples: verify libcurl man page examples 2023-12-04 10:50:42 +01:00
Daniel Stenberg
c5576d8d28
verify-examples.pl: verify that all man page examples compile clean 2023-12-04 10:50:42 +01:00
Daniel Stenberg
54d33862b5
RELEASE-NOTES: synced 2023-12-02 23:21:21 +01:00
Graham Campbell
f6e83a4cb0
http3: bump ngtcp2 and nghttp3 versions
nghttp3 v1.1.0
ngtcp2 v1.1.0

In docs and CI

Closes #12446
2023-12-02 23:02:54 +01:00
Graham Campbell
7b507feff4
CI/quiche: use 3.1.4+quic consistently in CI workflows
Closes #12447
2023-12-02 23:00:36 +01:00
Viktor Szakats
0f10360073
test1545: disable deprecation warnings
Fixes:
https://ci.appveyor.com/project/curlorg/curl/builds/48631551/job/bhx74e0i66yrp6pk#L1205

Same with details:
https://ci.appveyor.com/project/curlorg/curl/builds/48662893/job/ol8a78q9gmilb6wt#L1263
```
tests/libtest/lib1545.c:38:3: error: 'curl_formadd' is deprecated: since 7.56.0. Use curl_mime_init() [-Werror=deprecated-declarations]
   38 |   curl_formadd(&m_formpost, &lastptr, CURLFORM_COPYNAME, "file",
      |   ^~~~~~~~~~~~
[...]
```

Follow-up to 07a3cd83e0 #12421

Fixes #12445
Closes #12444
2023-12-02 20:17:41 +00:00
Daniel Stenberg
586e3c19cd
INSTALL: update list of ports and CPU archs 2023-12-02 17:40:48 +01:00
Daniel Stenberg
018f9cb480
symbols-in-versions: the CLOSEPOLICY options are deprecated
The were used with the CURLOPT_CLOSEPOLICY option, which *never* worked.
2023-12-02 17:07:34 +01:00
z2_
c44671ed43 build: fix builds that disable protocols but not digest auth
- Build base64 functions if digest auth is not disabled.

Prior to this change if some protocols were disabled but not digest auth
then a build error would occur due to missing base64 functions.

Fixes https://github.com/curl/curl/issues/12440
Closes https://github.com/curl/curl/pull/12442
2023-12-01 23:26:53 -05:00
MAntoniak
0eda1f6c9f
connect: reduce number of transportation providers
Use only the ones necessary - the ones that are built-in. Saves a few
bytes in the resulting code.

Closes #12438
2023-12-01 23:14:07 +01:00
David Benjamin
56791f3e23
vtls: consistently use typedef names for OpenSSL structs
The foo_st names don't appear in OpenSSL public API documentation. The
FOO typedefs are more common. This header was already referencing
SSL_CTX via <openssl/ssl.h>. There is a comment about avoiding
<openssl/x509v3.h>, but OpenSSL actually declares all the typedefs in
<openssl/ossl_typ.h>, which is already included by <openssl/ssl.h> (and
every other OpenSSL header), so just use that. Though I've included it
just to be explicit.

(I'm also fairly sure including <openssl/ssl.h> already triggers the
Schannel conflicts anyway. The comment was probably just out of date.)

Closes #12439
2023-12-01 23:00:43 +01:00
Lau
f5ba531ed2
libcurl-security.3: fix typo
Fixed minimal typo.

Closes #12437
2023-12-01 17:54:38 +01:00
Stefan Eissing
781cd3e864
ngtcp2: fix races in stream handling
- fix cases where ngtcp2 invokes callbacks on streams that
  nghttp3 has already forgotten. Ignore the NGHTTP3_ERR_STREAM_NOT_FOUND
  in these cases as it is normal behaviour.

Closes #12435
2023-12-01 17:52:36 +01:00
Emanuele Torre
6c7da81561
tool_writeout_json: fix JSON encoding of non-ascii bytes
char variables if unspecified can be either signed or unsigned depending
on the platform according to the C standard; in most platforms, they are
signed.

This meant that the  *i<32  waas always true for bytes with the top bit
set. So they were always getting encoded as \uXXXX, and then since they
were also signed negative, they were getting extended with 1s causing
'\xe2' to be expanded to \uffffffe2, for example:

  $ curl --variable 'v=“' --expand-write-out '{{v:json}}\n' file:///dev/null
  \uffffffe2\uffffff80\uffffff9c

I fixed this bug by making the code use explicitly unsigned char*
variables instead of char* variables.

Test 268 verifies

Reported-by: iconoclasthero
Closes #12434
2023-12-01 10:39:13 +01:00
Stefan Eissing
83e4d61981
cf-socket: TCP trace output local address used in connect
Closes #12427
2023-12-01 10:18:19 +01:00
Jay Satiro
841427376e CURLINFO_PRETRANSFER_TIME_T.3: fix time explanation
- Change CURLINFO_PRETRANSFER_TIME_T explanation to say that it
  includes protocol-specific instructions that trigger a transfer.

Prior to this change it explicitly said that it did not include those
instructions in the time, but that is incorrect.

The change is a copy of the fixed explanation already in
CURLINFO_PRETRANSFER_TIME, fixed by ec8dcd7b.

Reported-by: eeverettrbx@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/12431
Closes https://github.com/curl/curl/pull/12432
2023-12-01 02:58:00 -05:00
Daniel Stenberg
d1c2bb3d8d
multi: during ratelimit multi_getsock should return no sockets
... as there is nothing to wait for then, it just waits. Otherwise, this
causes much more CPU work and updates than necessary during ratelimit
periods.

Ref: https://curl.se/mail/lib-2023-11/0056.html
Closes #12430
2023-11-30 15:53:22 +01:00
Dmitry Karpov
6a0dc7cf23
transfer: abort pause send when connection is marked for closing
This handles cases of some bi-directional "upgrade" scenarios
(i.e. WebSockets) where sending is paused until some "upgrade" handshake
is completed, but server rejects the handshake and closes the
connection.

Closes #12428
2023-11-30 09:30:51 +01:00
Daniel Stenberg
a4ed3e766a
RELEASE-NOTES: synced 2023-11-28 23:04:09 +01:00
Daniel Stenberg
395365ad2d
openssl: when a session-ID is reused, skip OCSP stapling
Fixes #12399
Reported-by: Alexey Larikov
Closes #12418
2023-11-28 22:59:10 +01:00
Daniel Stenberg
07a3cd83e0
test1545: test doing curl_formadd twice with missing file
Reproduces #12410
Verifies the fix
Closes #12421
2023-11-28 22:57:42 +01:00
Daniel Stenberg
34e319954a
Curl_http_body: cleanup properly when Curl_getformdata errors
Reported-by: yushicheng7788 on github
Based-on-work-by: yushicheng7788 on github
Fixes #12410
Closes #12421
2023-11-28 22:57:22 +01:00
Daniel Stenberg
0ca3a4ec9a
test1477: verify that libcurl-errors.3 and public headers are synced
The script errorcodes.pl extracts all error codes from all headers and
checks that they are all documented, then checks that all documented
error codes are also specified in a header file.

Closes #12424
2023-11-28 22:55:50 +01:00
Daniel Stenberg
66ec950004
libcurl-errors.3: sync with current public headers
Closes #12424
2023-11-28 22:55:33 +01:00
Stefan Eissing
39778f95fd
test459: fix for parallel runs
- change warniing message to work better with varying filename
  length.
- adapt test output check to new formatting

Follow-up to 97ccc4479f
Closes #12423
2023-11-28 14:23:06 +01:00
Daniel Stenberg
e6bf2001c7
tool_cb_prg: make the carriage return fit for wide progress bars
When the progress bar was made max width (256 columns), the fly()
function attempted to generate its output buffer too long so that the
trailing carriage return would not fit and then the output would show
wrongly. The fly function is called when the expected total transfer is
unknown, which could be one or more progress calls before the actual
progress meter get shown when the expected transfer size is provided.

This new take also replaces the msnprintf() call with a much simpler
memset() for speed.

Reported-by: Tim Hill
Fixes #12407
Closes #12415
2023-11-27 19:16:05 +01:00
Daniel Stenberg
97ccc4479f
tool_parsecfg: make warning output propose double-quoting
When the config file parser detects a word that *probably* should be
quoted, mention double-quotes as a possible remedy.

Test 459 verifies.

Proposed-by: Jiehong on github
Fixes #12409
Closes #12412
2023-11-27 14:02:50 +01:00