]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agoconfigure: fix nghttp2 library name for static builds
t.artikov [Thu, 8 Jul 2021 20:11:14 +0000 (03:11 +0700)] 
configure: fix nghttp2 library name for static builds

Don't hardcode the nghttp2 library name,
because it can vary, be "nghttp2_static" for example.

Fixes https://github.com/curl/curl/issues/7367
Closes https://github.com/curl/curl/pull/7368

4 years ago[PellesC] fix _lseeki64() macro
Gisle Vanem [Thu, 15 Jul 2021 09:52:06 +0000 (11:52 +0200)] 
[PellesC] fix _lseeki64() macro

4 years ago[SChannel] Use '_tcsncmp()' instead
Gisle Vanem [Thu, 15 Jul 2021 14:28:29 +0000 (16:28 +0200)] 
[SChannel] Use '_tcsncmp()' instead

Revert previous change for PellesC.

Instead replace all use of `_tcsnccmp()` with `_tcsncmp()`.

4 years ago[PellesC] missing '_tcsnccmp'
Gisle Vanem [Thu, 15 Jul 2021 11:14:04 +0000 (13:14 +0200)] 
[PellesC] missing '_tcsnccmp'

PellesC compiler does not have this macro in it's `<tchar.h>`

4 years agoTODO: add mention of mbedTLS 3 incompatibilities
Daniel Gustafsson [Wed, 14 Jul 2021 21:54:43 +0000 (23:54 +0200)] 
TODO: add mention of mbedTLS 3 incompatibilities

Wyatt OʼDay reported in #7385 that mbedTLS isn't backwards compatible
and curl no longer builds with it. Document the need to fix our support
until so has been done.

Closes #7390
Fixes #7385
Reported-by: Wyatt OʼDay
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
4 years agodocs: fix inconsistencies in EGDSOCKET documentation
Daniel Gustafsson [Wed, 14 Jul 2021 21:47:37 +0000 (23:47 +0200)] 
docs: fix inconsistencies in EGDSOCKET documentation

Only the OpenSSL backend actually use the EGDSOCKET, and also use
TLS consistently rather than mixing SSL and TLS. While there, also
fix a minor spelling nit.

Closes: #7391
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
4 years agodocs: document missing arguments to commands
Борис Верховский [Tue, 13 Jul 2021 03:09:26 +0000 (21:09 -0600)] 
docs: document missing arguments to commands

This is a followup to commit f410b9e538129e77607fef1 fixing a few
more commands which takes arguments.

Closes #7382
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agodocs: fix incorrect argument name reference
Randolf J [Tue, 13 Jul 2021 07:50:12 +0000 (00:50 -0700)] 
docs: fix incorrect argument name reference

The documentation for the read callback was erroneously referencing
the nitems argument by nmemb.  The error was introduced in commit
ce0881edee3c7.

Closes #7383
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agotool_help: Document that --tlspassword takes a password
Борис Верховский [Sun, 11 Jul 2021 22:56:23 +0000 (16:56 -0600)] 
tool_help: Document that --tlspassword takes a password

Closes #7378
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
4 years agoscripts: Fix typo in release-notes instructions
Daniel Gustafsson [Sat, 10 Jul 2021 20:36:26 +0000 (22:36 +0200)] 
scripts: Fix typo in release-notes instructions

The command to run had a typo in the pathname which prevented copy
pasting it to work, which has annoyed me enough to fix this now.

4 years agoRELEASE-NOTES: synced
Daniel Gustafsson [Sat, 10 Jul 2021 20:34:55 +0000 (22:34 +0200)] 
RELEASE-NOTES: synced

4 years agowrite-out.d: Clarify urlnum is not unique for de-globbed URLs
Jay Satiro [Fri, 9 Jul 2021 04:55:52 +0000 (00:55 -0400)] 
write-out.d: Clarify urlnum is not unique for de-globbed URLs

Reported-by: Коваленко Анатолий Викторович
Fixes https://github.com/curl/curl/issues/7342
Closes https://github.com/curl/curl/pull/7369

4 years agodocs: Fix typos
William Desportes [Fri, 9 Jul 2021 12:21:32 +0000 (14:21 +0200)] 
docs: Fix typos

Closes: #7370
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agoRevert "ftp: Expression 'ftpc->wait_data_conn' is always false"
Jonathan Wernberg [Wed, 7 Jul 2021 12:55:33 +0000 (14:55 +0200)] 
Revert "ftp: Expression 'ftpc->wait_data_conn' is always false"

The reverted commit introduced a logic error in code that was
correct.

The client using libcurl would notice the error since FTP file
uploads in active transfer mode would somtimes complete with
success despite no transfer having been performed and the
"uploaded" file thus not being on the remote server afterwards.

The FTP server would notice the error because it receives a
RST on the data connection it has established with the client
before any data was transferred at all.

The logic error happens if the STOR response from the server have
arrived by the time ftp_multi_statemach() in the affected code path
is called, but the incoming data connection have not arrived yet.
In that case, the processing of the STOR response will cause
'ftpc->wait_data_conn' to be set to TRUE, contradicting the comment
in the code. Since 'complete' will also be set, later logic would
believe the transfer was done.

In most cases, the STOR response will not have arrived yet when
the affected code path is executed, or the incoming connection will
also have arrived, and thus the error would not express itself.
But if the speed difference of the device using libcurl and the
FTP server is exactly right, the error may happen as often as in
one out of hundred file transfers.

This reverts commit 49f3117a238b6eac0e22a32f50699a9eddcb66ab.

Bug: https://curl.se/mail/lib-2021-07/0025.html
Closes #7362

4 years agomsnprintf: return number of printed characters excluding null byte
Daniel Stenberg [Wed, 7 Jul 2021 12:51:17 +0000 (14:51 +0200)] 
msnprintf: return number of printed characters excluding null byte

... even when the output is "capped" by the maximum length argument.

Clarified in the docs.

Closes #7361

4 years agoinfof: remove newline from format strings, always append it
Daniel Stenberg [Tue, 6 Jul 2021 15:05:17 +0000 (17:05 +0200)] 
infof: remove newline from format strings, always append it

- the data needs to be "line-based" anyway since it's also passed to the
  debug callback/application

- it makes infof() work like failf() and consistency is good

- there's an assert that triggers on newlines in the format string

- Also removes a few instances of "..."

- Removes the code that would append "..." to the end of the data *iff*
  it was truncated in infof()

Closes #7357

4 years agoexamples/multi-single: fix scan-build warning
Daniel Stenberg [Wed, 7 Jul 2021 08:14:35 +0000 (10:14 +0200)] 
examples/multi-single: fix scan-build warning

warning: Value stored to 'mc' during its initialization is never read

Follow-up to ae8e11ed5fd2ce

Closes #7360

4 years agowolfssl: failing to set a session id is not reason to error out
Daniel Stenberg [Mon, 5 Jul 2021 15:55:24 +0000 (17:55 +0200)] 
wolfssl: failing to set a session id is not reason to error out

... as it is *probably* just timed out.

Reported-by: Francisco Munoz
Closes #7358

4 years agodocs/examples: use curl_multi_poll() in multi examples
Daniel Stenberg [Tue, 6 Jul 2021 08:51:46 +0000 (10:51 +0200)] 
docs/examples: use curl_multi_poll() in multi examples

The API is soon two years old and deserves being shown as the primary
way to drive multi code as it makes it much easier to write code.

multi-poll: removed

multi-legacy: add to show how we did multi API use before
curl_multi_wait/poll.

Closes #7352

4 years agoKNOWN_BUGS: flaky Windows CI builds
Daniel Stenberg [Mon, 5 Jul 2021 21:30:44 +0000 (23:30 +0200)] 
KNOWN_BUGS: flaky Windows CI builds

Closes #6972

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 5 Jul 2021 20:55:14 +0000 (22:55 +0200)] 
RELEASE-NOTES: synced

4 years agotest1147: hyper doesn't allow "crazy" request headers like built-in
Daniel Stenberg [Mon, 5 Jul 2021 14:53:00 +0000 (16:53 +0200)] 
test1147: hyper doesn't allow "crazy" request headers like built-in

... so strip that from the test.

Closes #7349

4 years agoc-hyper: bail on too long response headers
Daniel Stenberg [Mon, 5 Jul 2021 15:13:29 +0000 (17:13 +0200)] 
c-hyper: bail on too long response headers

To match with built-in behaviors. Makes test 1154 work.

Closes #7350

4 years agotest1151: added missing CRLF to work with hyper
Daniel Stenberg [Mon, 5 Jul 2021 15:13:13 +0000 (17:13 +0200)] 
test1151: added missing CRLF to work with hyper

Closes #7350

4 years agoc-hyper: add support for transfer-encoding in the request
Daniel Stenberg [Mon, 5 Jul 2021 13:52:39 +0000 (15:52 +0200)] 
c-hyper: add support for transfer-encoding in the request

Closes #7348

4 years agocmake: remove libssh2 feature checks
Andrea Pappacoda [Sun, 4 Jul 2021 18:13:50 +0000 (20:13 +0200)] 
cmake: remove libssh2 feature checks

libssh2 features are detected based on version since commit
9dbbba997608f7c3c5de1c627c77c8cd2aa85b73

Closes #7343

4 years agotest1116: hyper doesn't pass through "surprise-trailers"
Daniel Stenberg [Mon, 5 Jul 2021 08:55:38 +0000 (10:55 +0200)] 
test1116: hyper doesn't pass through "surprise-trailers"

Closes #7344

4 years agosocks4: scan for the IPv4 address in resolve results
Daniel Stenberg [Mon, 5 Jul 2021 11:28:26 +0000 (13:28 +0200)] 
socks4: scan for the IPv4 address in resolve results

Follow-up to 84d2839740 which changed the resolving to always resolve
both address families, but since SOCKS4 only supports IPv4 it should
scan for and use the first available IPv4 address.

Reported-by: shithappens2016 on github
Fixes #7345
Closes #7346

4 years agoproto.d: fix formatting for paragraphs after margin changes
Jay Satiro [Sat, 3 Jul 2021 21:36:51 +0000 (17:36 -0400)] 
proto.d: fix formatting for paragraphs after margin changes

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

4 years agopinnedpubkey.d: fix formatting for version support lists
Jay Satiro [Sat, 3 Jul 2021 21:11:00 +0000 (17:11 -0400)] 
pinnedpubkey.d: fix formatting for version support lists

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

4 years agoTODO: "Support in-memory certs/ca certs/keys" done
Daniel Stenberg [Fri, 2 Jul 2021 08:19:21 +0000 (10:19 +0200)] 
TODO: "Support in-memory certs/ca certs/keys" done

Has been suppored for a while now with the *BLOB options.

4 years agoexamples: safer and more proper read callback logic
Daniel Stenberg [Thu, 1 Jul 2021 07:21:40 +0000 (09:21 +0200)] 
examples: safer and more proper read callback logic

The same callback code is used in:

 imap-append.c
 smtp-authzid.c
 smtp-mail.c
 smtp-multi.c
 smtp-ssl.c
 smtp-tls.c

It should not assume that it can copy full lines into the buffer as it
will encourage sloppy coding practices. Instead use byte-wise logic and
check/acknowledge the buffer size appropriately.

Reported-by: Harry Sintonen
Fixes #7330
Closes #7331

4 years agotest1519: adjusted to work with hyper
Daniel Stenberg [Thu, 1 Jul 2021 09:22:11 +0000 (11:22 +0200)] 
test1519: adjusted to work with hyper

Closes #7333

4 years agotest1518: adjusted to work with hyper
Daniel Stenberg [Thu, 1 Jul 2021 09:21:05 +0000 (11:21 +0200)] 
test1518: adjusted to work with hyper

... by making sure the stdout output doesn't look like HTTP headers.

Closes #7333

4 years agotest1514: add a CRLF to the response to make it correct
Daniel Stenberg [Thu, 1 Jul 2021 10:50:11 +0000 (12:50 +0200)] 
test1514: add a CRLF to the response to make it correct

Makes hyper accept it fine instead returning HYPERE_UNEXPECTED_EOF on
us.

Closes #7334

4 years agoformdata: avoid "Argument cannot be negative" warning
Daniel Stenberg [Wed, 30 Jun 2021 22:14:22 +0000 (00:14 +0200)] 
formdata: avoid "Argument cannot be negative" warning

... when converting a curl_off_t to size_t, by using
CURL_ZERO_TERMINATED before passing the argument to the function.

Detected by Coverity CID 1486590.

Closes #7328
Assisted-by: Daniel Gustafsson
4 years agolib: more %u for port and int for %*s fixes
Daniel Stenberg [Wed, 30 Jun 2021 22:21:43 +0000 (00:21 +0200)] 
lib: more %u for port and int for %*s fixes

Detected by Coverity

Closes #7329

4 years agodoh: (void)-prefix call to curl_easy_setopt
Daniel Stenberg [Wed, 30 Jun 2021 22:06:27 +0000 (00:06 +0200)] 
doh: (void)-prefix call to curl_easy_setopt

4 years agolib: fix type of len passed to *printf's %*s
Daniel Stenberg [Wed, 30 Jun 2021 11:13:31 +0000 (13:13 +0200)] 
lib: fix type of len passed to *printf's %*s

... it needs to be 'int'. Detected by Coverity CID 1486611 (etc)

Closes #7326

4 years agolib: use %u instead of %ld for port number printf
Daniel Stenberg [Wed, 30 Jun 2021 10:56:22 +0000 (12:56 +0200)] 
lib: use %u instead of %ld for port number printf

Follow-up to 764c6bd3bf which changed the type of some port number
fields. Detected by Coverity (CID 1486624) etc.

Closes #7325

4 years agoversion: turn version number functions into returning void
Daniel Stenberg [Wed, 30 Jun 2021 09:09:55 +0000 (11:09 +0200)] 
version: turn version number functions into returning void

... as we never use the return codes from them.

Reviewed-by: Daniel Gustafsson
Closes #7319

4 years agomqtt: extend the error message for no topic
Daniel Stenberg [Wed, 30 Jun 2021 06:30:24 +0000 (08:30 +0200)] 
mqtt: extend the error message for no topic

... and mention that it needs URL encoding.

Reported-by: Peter Körner
Fixes #7316
Closes #7317

4 years agoformdata: correct typecast in curl_mime_data call
Daniel Stenberg [Wed, 30 Jun 2021 11:25:47 +0000 (13:25 +0200)] 
formdata: correct typecast in curl_mime_data call

Coverity pointed out it the mismatch. CID 1486590

Closes #7327

4 years agourl: (void)-prefix a curl_url_get() call
Daniel Stenberg [Wed, 30 Jun 2021 09:17:57 +0000 (11:17 +0200)] 
url: (void)-prefix a curl_url_get() call

Coverity (CID 1486645) pointed out a use of curl_url_get() in the
parse_proxy function where the return code wasn't checked. A
(void)-prefix makes the intention obvious.

Closes #7320

4 years agoglob: pass an 'int' as len when using printf's %*s
Daniel Stenberg [Wed, 30 Jun 2021 10:47:43 +0000 (12:47 +0200)] 
glob: pass an 'int' as len when using printf's %*s

Detected by Coverity CID 1486629.

Closes #7324

4 years agovtls: use free() not curl_free()
Daniel Stenberg [Wed, 30 Jun 2021 08:41:19 +0000 (10:41 +0200)] 
vtls: use free() not curl_free()

curl_free() is provided for users of the API to free returned data,
there's no need to use it internally.

Closes #7318

4 years agozuul: use the new rustls directory name
Daniel Stenberg [Tue, 29 Jun 2021 06:27:01 +0000 (08:27 +0200)] 
zuul: use the new rustls directory name

Follow-up to 6d972c8b1cbb3 which missed updating this directory name.

Also no longer call it crustls in the docs and bump to rusttls-ffi 0.7.1

Closes #7311

4 years agohttp: fix crash in rate-limited upload
Jay Satiro [Tue, 29 Jun 2021 15:43:35 +0000 (11:43 -0400)] 
http: fix crash in rate-limited upload

- Don't set the size of the piece of data to send to the rate limit if
  that limit is larger than the buffer size that will hold the piece.

Prior to this change if CURLOPT_MAX_SEND_SPEED_LARGE
(curl tool: --limit-rate) was set then it was possible that a temporary
buffer used for uploading could be written to out of bounds. A likely
scenario for this would be a non-trivial amount of post data combined
with a rate limit larger than CURLOPT_UPLOAD_BUFFERSIZE (default 64k).

The bug was introduced in 24e469f which is in releases since 7.76.0.

perl -e "print '0' x 200000" > tmp
curl --limit-rate 128k -d @tmp httpbin.org/post

Reported-by: Richard Marion
Fixes https://github.com/curl/curl/issues/7308
Closes https://github.com/curl/curl/pull/7315

4 years agocopyright: add boiler-plate headers to CI config files
Daniel Stenberg [Tue, 29 Jun 2021 14:45:13 +0000 (16:45 +0200)] 
copyright: add boiler-plate headers to CI config files

And whitelist .zuul.ignore

Closes #7314

4 years agoCI: remove travis details
Daniel Stenberg [Tue, 29 Jun 2021 14:38:56 +0000 (16:38 +0200)] 
CI: remove travis details

Rename still used leftovers to "zuul" as that's now the CI using them.

Closes #7313

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 29 Jun 2021 15:34:00 +0000 (17:34 +0200)] 
RELEASE-NOTES: synced

4 years agoopenssl: avoid static variable for seed flag
Daniel Stenberg [Mon, 28 Jun 2021 14:41:17 +0000 (16:41 +0200)] 
openssl: avoid static variable for seed flag

Avoid the race condition risk by instead storing the "seeded" flag in
the multi handle. Modern OpenSSL versions handle the seeding itself so
doing the seeding once per multi-handle instead of once per process is
less of an issue.

Reported-by: Gerrit Renker
Fixes #7296
Closes #7306

4 years agoconfigure: inhibit the implicit-fallthrough warning on gcc-12
Daniel Stenberg [Mon, 28 Jun 2021 15:01:29 +0000 (17:01 +0200)] 
configure: inhibit the implicit-fallthrough warning on gcc-12

... since it no longer acknowledges the comment markup we use for that
purpose.

Reported-by: Younes El-karama
Fixes #7295
Closes #7307

4 years agomisc: fix typos in comments which repeat a word
Andrei Rybak [Mon, 28 Jun 2021 10:15:34 +0000 (12:15 +0200)] 
misc: fix typos in comments which repeat a word

Fix typos in code comments which repeat various words.  In trivial
cases, just delete the repeated word.  Reword the affected sentence in
"lib/url.c" for it to make sense.

Closes #7303
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agolib677: make it survive torture testing
Daniel Stenberg [Sun, 27 Jun 2021 14:05:32 +0000 (16:05 +0200)] 
lib677: make it survive torture testing

Follow-up to a5ab72d5edd7

Closes #7300

4 years agodocs/BINDINGS: fix outdated links
Tommy Chiang [Sun, 27 Jun 2021 18:36:27 +0000 (02:36 +0800)] 
docs/BINDINGS: fix outdated links

* luacurl page is now not accessible, fix it with wayback machine page
* Scheme one seems not providing https now, change it back to http one

Closes #7301

4 years agocurstls: bump crustls version and use new URL
Jacob Hoffman-Andrews [Fri, 25 Jun 2021 02:43:19 +0000 (19:43 -0700)] 
curstls: bump crustls version and use new URL

crustls moved to https://github.com/rustls/rustls-ffi. This also bumps
the expected version to 0.7.0.

Closes #7297

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 24 Jun 2021 14:02:20 +0000 (16:02 +0200)] 
RELEASE-NOTES: synced

4 years agoexamples: length-limit two sscanf() uses of %s
Daniel Stenberg [Thu, 24 Jun 2021 07:24:37 +0000 (09:24 +0200)] 
examples: length-limit two sscanf() uses of %s

Reported-by: Jishan Shaikh
Fixes #7293
Closes #7294

4 years agomulti: alter transfer timeout ordering
Richard Whitehouse [Thu, 30 Nov 2017 16:56:53 +0000 (16:56 +0000)] 
multi: alter transfer timeout ordering

- Check whether a connection has succeded before checking whether it's
  timed out.

  This means if we've connected quickly, but subsequently been
  descheduled, we allow the connection to succeed. Note, if we timeout,
  but between checking the timeout, and connecting to the server the
  connection succeeds, we will allow it to go ahead. This is viewed as
  an acceptable trade off.

- Add additional failf logging around failed connection attempts to
  propogate the cause up to the caller.

Co-Authored-by: Martin Howarth
Closes #7178

4 years agotest677: IMAP CONNECT_ONLY, custom command and then exit
Daniel Stenberg [Fri, 18 Jun 2021 21:49:25 +0000 (23:49 +0200)] 
test677: IMAP CONNECT_ONLY, custom command and then exit

Adjusted ftpserver.pl to add support for the IMAP IDLE command

Adjusted test 660 to sync with the fix

4 years agomulti: do not switch off connect_only flag when closing
Daniel Stenberg [Wed, 23 Jun 2021 07:35:26 +0000 (09:35 +0200)] 
multi: do not switch off connect_only flag when closing

... as it made protocol specific disconnect commands wrongly get used.

Bug: https://curl.se/mail/lib-2021-06/0024.html
Reported-by: Aleksander Mazur
Closes #7288

4 years agohttp: make the haproxy support work with unix domain sockets
Daniel Stenberg [Wed, 23 Jun 2021 14:02:12 +0000 (16:02 +0200)] 
http: make the haproxy support work with unix domain sockets

... it should then pass on "PROXY UNKNOWN" since it doesn't know the
involved IP addresses.

Reported-by: Valentín Gutiérrez
Fixes #7290
Closes #7291

4 years agocurl.h: include sys/select.h for NuttX RTOS
Xiang Xiao [Tue, 22 Jun 2021 09:55:53 +0000 (17:55 +0800)] 
curl.h: include sys/select.h for NuttX RTOS

Closes #7287

4 years agocurl.h: remove the execution bit
Bin Meng [Tue, 22 Jun 2021 09:19:37 +0000 (17:19 +0800)] 
curl.h: remove the execution bit

The execution bit of curl.h file was wrongly added:

  commit 2621025d6f96 ("curl.h: <sys/select.h> is supported by VxWorks7")

and should be removed.

Follow-up to 2621025d6f96 ("curl.h: <sys/select.h> is supported by VxWorks7")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Closes #7286

4 years agocurl.h: <sys/select.h> is supported by VxWorks7
Bin Lan [Tue, 22 Jun 2021 03:28:31 +0000 (11:28 +0800)] 
curl.h: <sys/select.h> is supported by VxWorks7

Closes #7285

4 years agoquiche: use send() instead of sendto() to avoid macOS issue
Bachue Zhou [Tue, 15 Jun 2021 09:56:12 +0000 (17:56 +0800)] 
quiche: use send() instead of sendto() to avoid macOS issue

sendto() always returns "Socket is already connected" error on macos

Closes #7260

4 years agocmake: fix support for UnixSockets feature on Win32
Li Xinwei [Fri, 4 Jun 2021 07:03:30 +0000 (15:03 +0800)] 
cmake: fix support for UnixSockets feature on Win32

Move the definition of sockaddr_un struct from config-win32.h to
curl_setup.h, so that it could be shared by all build systems.

Add ADDRESS_FAMILY typedef for old mingw, now old mingw can also use
unix sockets.

Also fix the build of tests/server/sws.c on Win32 when USE_UNIX_SOCKETS
is defined.

Closes #7034

4 years agohostip: (macOS) free returned memory of SCDynamicStoreCopyProxies
Gregory Muchka [Wed, 16 Jun 2021 00:12:49 +0000 (18:12 -0600)] 
hostip: (macOS) free returned memory of SCDynamicStoreCopyProxies

From Apples documentation on SCDynamicStoreCopyProxies, "Return Value: A
dictionary of key-value pairs that represent the current internet proxy
settings, or NULL if no proxy settings have been defined or if an error
occurred. You must release the returned value."

Failure to release the returned value of SCDynamicStoreCopyProxies can
result in a memory leak.

Source: https://developer.apple.com/documentation/systemconfiguration/1517088-scdynamicstorecopyproxies

Closes #7265

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 21 Jun 2021 08:12:00 +0000 (10:12 +0200)] 
RELEASE-NOTES: synced

4 years agovtls: fix warning due to function prototype mismatch
Jay Satiro [Sun, 20 Jun 2021 20:42:58 +0000 (16:42 -0400)] 
vtls: fix warning due to function prototype mismatch

b09c8ee changed the function prototype. Caught by Visual Studio.

4 years agocurl_multibyte: Remove local encoding fallbacks
Jay Satiro [Tue, 15 Jun 2021 04:13:36 +0000 (00:13 -0400)] 
curl_multibyte: Remove local encoding fallbacks

- If the UTF-8 to UTF-16 conversion fails in Windows Unicode builds then
  no longer fall back to assuming the string is in a local encoding.

Background:

Some functions in Windows Unicode builds must convert UTF-8 to UTF-16 to
pass to the Windows CRT API wide-character functions since in Windows
UTF-8 is not a valid locale (or at least 99% of the time right now).

Prior to this change if the Unicode encoding conversion failed then
libcurl would assume, for backwards compatibility with applications that
may have written their code for non-Unicode builds, attempt to convert
the string from local encoding to UTF-16.

That type of "best effort" could theoretically cause some type of
security or other problem if a string that was locally encoded was also
valid UTF-8, and therefore an unexpected UTF-8 to UTF-16 conversion
could occur.

Ref: https://github.com/curl/curl/pull/7246

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

4 years agocurl_endian: remove the unused Curl_write64_le function
Daniel Stenberg [Sat, 19 Jun 2021 21:21:16 +0000 (23:21 +0200)] 
curl_endian: remove the unused Curl_write64_le function

The last usage was removed in cca455a36

Closes #7280

4 years agovtls: only store TIMER_APPCONNECT for non-proxy connect
Daniel Stenberg [Fri, 18 Jun 2021 08:18:39 +0000 (10:18 +0200)] 
vtls: only store TIMER_APPCONNECT for non-proxy connect

Introducing a 'isproxy' argument to the connect function so that it
knows wether to store the time stamp or not.

Reported-by: Yongkang Huang
Fixes #7274
Closes #7274

4 years agognutls: set the preferred TLS versions in correct order 7278/head
Daniel Stenberg [Fri, 18 Jun 2021 12:54:07 +0000 (14:54 +0200)] 
gnutls: set the preferred TLS versions in correct order

Regression since 781864bedbc57 (curl 7.77.0)

Reported-by: civodul on github
Assisted-by: Nikos Mavrogiannopoulos
Fixes #7277
Closes #7278

4 years agoconfigure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r
Gergely Nagy [Fri, 18 Jun 2021 08:39:35 +0000 (10:39 +0200)] 
configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r

Closes #7276

4 years agoconfigure/cmake: remove checks for unused inet_ntoa and inet_ntoa_r
Gergely Nagy [Fri, 18 Jun 2021 08:16:16 +0000 (10:16 +0200)] 
configure/cmake: remove checks for unused inet_ntoa and inet_ntoa_r

Closes #7276

4 years agoconfigure/cmake: remove unused define HAVE_PERROR
Gergely Nagy [Fri, 18 Jun 2021 08:10:51 +0000 (10:10 +0200)] 
configure/cmake: remove unused define HAVE_PERROR

Closes #7276

4 years agoconfigure: remove unused check for gai_strerror
Gergely Nagy [Fri, 18 Jun 2021 08:05:43 +0000 (10:05 +0200)] 
configure: remove unused check for gai_strerror

Closes #7276

4 years agoconfigure/cmake: remove unused define HAVE_FREEIFADDRS
Gergely Nagy [Fri, 18 Jun 2021 08:04:38 +0000 (10:04 +0200)] 
configure/cmake: remove unused define HAVE_FREEIFADDRS

Closes #7276

4 years agoconfigure/cmake: remove unused define HAVE_FORK
Gergely Nagy [Fri, 18 Jun 2021 08:01:29 +0000 (10:01 +0200)] 
configure/cmake: remove unused define HAVE_FORK

Closes #7276

4 years agoconfigure/cmake: remove unused define HAVE_FDOPEN
Gergely Nagy [Fri, 18 Jun 2021 07:59:22 +0000 (09:59 +0200)] 
configure/cmake: remove unused define HAVE_FDOPEN

Closes #7276

4 years agoconfigure/cmake: remove checks for unused sgtty.h
Gergely Nagy [Fri, 18 Jun 2021 07:54:57 +0000 (09:54 +0200)] 
configure/cmake: remove checks for unused sgtty.h

Closes #7276

4 years agoconfigure/cmake: remove remaining checks for rsa.h
Gergely Nagy [Fri, 18 Jun 2021 07:52:37 +0000 (09:52 +0200)] 
configure/cmake: remove remaining checks for rsa.h

Closes #7276

4 years agoconfigure/cmake: remove remaining checks for err.h
Gergely Nagy [Fri, 18 Jun 2021 07:51:59 +0000 (09:51 +0200)] 
configure/cmake: remove remaining checks for err.h

Closes #7276

4 years agoconfigure/cmake: remove remaining checks for crypto.h
Gergely Nagy [Fri, 18 Jun 2021 07:50:17 +0000 (09:50 +0200)] 
configure/cmake: remove remaining checks for crypto.h

Closes #7276

4 years agoconfigure/cmake: remove checks for unused getservbyport_r
Gergely Nagy [Fri, 18 Jun 2021 07:47:39 +0000 (09:47 +0200)] 
configure/cmake: remove checks for unused getservbyport_r

Closes #7276

4 years ago--socks4[a]: clarify where the host name is resolved
Daniel Stenberg [Thu, 17 Jun 2021 15:26:36 +0000 (17:26 +0200)] 
--socks4[a]: clarify where the host name is resolved

Closes #7273

4 years agolibcurl-security.3: mention file descriptors and forks
Daniel Stenberg [Thu, 17 Jun 2021 08:06:57 +0000 (10:06 +0200)] 
libcurl-security.3: mention file descriptors and forks

... and move the security report section last.

Reported-by: Harry Sintonen
Closes #7270

4 years agoconfigure.ac: make non-executable
Alex Xu (Hello71) [Thu, 17 Jun 2021 13:11:05 +0000 (09:11 -0400)] 
configure.ac: make non-executable

it needs to be processed by autoconf or autoreconf, and doesn't have a
suitable shebang to be directly executed. other projects normally set
configure.ac -x.

Closes #7272

4 years agoconfigure: do not strip out debug flags
Daniel Stenberg [Wed, 16 Jun 2021 12:14:54 +0000 (14:14 +0200)] 
configure: do not strip out debug flags

To allow users to set them when invoking configure without using
--with-debug.

Reported-by: Alex Xu
Fixes #7216
Closes #7267

4 years agolibssh2: limit time a disconnect can take to 1 second
Daniel Stenberg [Thu, 17 Jun 2021 08:25:53 +0000 (10:25 +0200)] 
libssh2: limit time a disconnect can take to 1 second

Closes #7271

4 years agoTLS: prevent shutdown loops to get stuck
Daniel Stenberg [Thu, 17 Jun 2021 08:24:41 +0000 (10:24 +0200)] 
TLS: prevent shutdown loops to get stuck

... by making sure the loops are only allowed to read the shutdown
traffic a limited number of times.

Reported-by: Harry Sintonen
Closes #7271

4 years agohyper: propagate errors back up from read callbacks
Daniel Stenberg [Wed, 16 Jun 2021 08:52:21 +0000 (10:52 +0200)] 
hyper: propagate errors back up from read callbacks

Makes test 513 work with hyper

Closes #7266

4 years agoKNOWN_BUGS: Negotiate on Windows fails
Daniel Stenberg [Wed, 16 Jun 2021 12:29:11 +0000 (14:29 +0200)] 
KNOWN_BUGS: Negotiate on Windows fails

Closes #5881

4 years agoKNOWN_BUGS: renames instead of locking for atomic operations
Daniel Stenberg [Wed, 16 Jun 2021 08:59:39 +0000 (10:59 +0200)] 
KNOWN_BUGS: renames instead of locking for atomic operations

Closes #6882
Closes #6884

4 years agozuul: add two missing CI jobs
Daniel Stenberg [Tue, 15 Jun 2021 13:10:32 +0000 (15:10 +0200)] 
zuul: add two missing CI jobs

... that were configured, just not run

Closes #7261

4 years agoidn: fix libidn2 with windows unicode builds
Viktor Szakats [Tue, 15 Jun 2021 12:10:48 +0000 (12:10 +0000)] 
idn: fix libidn2 with windows unicode builds

Unicode Windows builds use UTF-8 strings internally in libcurl,
so make sure to call the UTF-8 flavour of the libidn2 API. Also
document that Windows builds with libidn2 and UNICODE do expect
CURLOPT_URL as an UTF-8 string.

Reported-by: dEajL3kA on github
Assisted-by: Jay Satiro
Reviewed-by: Marcel Raad
Closes #7246
Fixes #7228

4 years agocurl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE
Daniel Stenberg [Mon, 31 May 2021 06:59:24 +0000 (08:59 +0200)] 
curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACE

They were never officially allowed and slipped in only due to sloppy
parsing. Spaces (ascii 32) should be correctly encoded (to %20) before
being part of a URL.

The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl
allow spaces.

Updated test 1560 to verify.

Closes #7073

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 15 Jun 2021 08:08:09 +0000 (10:08 +0200)] 
RELEASE-NOTES: synced

... and bump to version 7.78.0 for the next planned release.