]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agotests: fix Python 3 compatibility of smbserver.py
Marc Hoersken [Wed, 29 Jan 2020 16:14:01 +0000 (17:14 +0100)] 
tests: fix Python 3 compatibility of smbserver.py

5 years agoruntests: restore the command log
Daniel Stenberg [Tue, 11 Feb 2020 16:36:23 +0000 (17:36 +0100)] 
runtests: restore the command log

The log file with all command lines for the invoked command lines is now
called logs/commands.log

Fixes #4911
Closes #4989

5 years agosmtp: fix memory leak on exit path
Daniel Stenberg [Thu, 27 Feb 2020 13:37:40 +0000 (14:37 +0100)] 
smtp: fix memory leak on exit path

Detected by Coverity. CID 1418139. "leaked_storage: Variable 'from'
going out of scope leaks the storage it points to"

Closes #4990

5 years agogtls: Fixed compilation when using GnuTLS < 3.5.0
Steve Holme [Thu, 27 Feb 2020 02:01:16 +0000 (02:01 +0000)] 
gtls: Fixed compilation when using GnuTLS < 3.5.0

Reverts the functionality from 41fcb4f when compiling with GnuTLS older
than 3.5.0.

Reviewed-by: Daniel Stenberg
Closes #4984

5 years agoRELEASE-NOTES: Corrected the link to issue #4892
Steve Holme [Thu, 27 Feb 2020 14:24:08 +0000 (14:24 +0000)] 
RELEASE-NOTES: Corrected the link to issue #4892

5 years agoCurl_is_ASCII_name: handle a NULL argument
Daniel Stenberg [Thu, 27 Feb 2020 10:06:14 +0000 (11:06 +0100)] 
Curl_is_ASCII_name: handle a NULL argument

Make the function tolerate a NULL pointer input to avoid dereferencing
that pointer.

Follow-up to efce3ea5a85126d
Detected by OSS-Fuzz
Reviewed-By: Steve Holme
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20907
Fixes #4985
Closes #4986

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 27 Feb 2020 09:49:27 +0000 (10:49 +0100)] 
RELEASE-NOTES: synced

5 years agohttp2: make pausing/unpausing set/clear local stream window
Daniel Stenberg [Thu, 27 Feb 2020 08:42:11 +0000 (09:42 +0100)] 
http2: make pausing/unpausing set/clear local stream window

This reduces the HTTP/2 window size to 32 MB since libcurl might have to
buffer up to this amount of data in memory and yet we don't want it set
lower to potentially impact tranfer performance on high speed networks.

Requires nghttp2 commit b3f85e2daa629
(https://github.com/nghttp2/nghttp2/pull/1444) to work properly, to end
up in the next release after 1.40.0.

Fixes #4939
Closes #4940

5 years agolibssh: improve known hosts handling
Anderson Toshiyuki Sasaki [Fri, 21 Feb 2020 10:09:26 +0000 (11:09 +0100)] 
libssh: improve known hosts handling

Previously, it was not possible to get a known hosts file entry due to
the lack of an API.  ssh_session_get_known_hosts_entry(), introduced in
libssh-0.9.0, allows libcurl to obtain such information and behave the
same as when compiled with libssh2.

This also tries to avoid the usage of deprecated functions when the
replacements are available.  The behaviour will not change if versions
older than libssh-0.8.0 are used.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Fixes #4953
Closes #4962

5 years agotests: Automatically deduce the tool name from the test case for unit tests
Steve Holme [Sun, 23 Feb 2020 08:20:32 +0000 (08:20 +0000)] 
tests: Automatically deduce the tool name from the test case for unit tests

It is still possible to override the executable to run during the test,
using the <tool> tag, but this patch removes the requirement that the
tag must be present for unit tests.

It also removes the possibility of human error when existing test cases
are used as the basis for new tests, as recently witnessed in 81c37124.

Reviewed-by: Daniel Stenberg
Closes #4976

5 years agotest1323: Added the missing 'unit test' feature requirement in the test case
Steve Holme [Sun, 23 Feb 2020 06:38:06 +0000 (06:38 +0000)] 
test1323: Added the missing 'unit test' feature requirement in the test case

5 years agocookie: remove unnecessary check for 'out != 0'
Daniel Stenberg [Wed, 26 Feb 2020 22:50:03 +0000 (23:50 +0100)] 
cookie: remove unnecessary check for 'out != 0'

... as it will always be non-NULL at this point.

Detected by Coverity: CID 1459009

5 years agohttp: added 417 response treatment
Daniel Stenberg [Wed, 26 Feb 2020 21:48:09 +0000 (22:48 +0100)] 
http: added 417 response treatment

When doing a request with a body + Expect: 100-continue and the server
responds with a 417, the same request will be retried immediately
without the Expect: header.

Added test 357 to verify.

Also added a control instruction to tell the sws test server to not read
the request body if Expect: is present, which the new test 357 uses.

Reported-by: bramus on github
Fixes #4949
Closes #4964

5 years agosmtp: Tidy up, following recent changes, to maintain the coding style
Steve Holme [Sun, 9 Feb 2020 02:18:37 +0000 (02:18 +0000)] 
smtp: Tidy up, following recent changes, to maintain the coding style

Closes #4892

5 years agosmtp: Support the SMTPUTF8 extension for the EXPN command
Steve Holme [Sun, 9 Feb 2020 16:41:34 +0000 (16:41 +0000)] 
smtp: Support the SMTPUTF8 extension for the EXPN command

Simply notify the server we support the SMTPUTF8 extension if it does.

5 years agosmtp: Support the SMTPUTF8 extension in the VRFY command
Steve Holme [Thu, 13 Feb 2020 22:56:51 +0000 (22:56 +0000)] 
smtp: Support the SMTPUTF8 extension in the VRFY command

5 years agosmtp: Support the SMTPUTF8 extension in the RCPT TO command
Steve Holme [Thu, 13 Feb 2020 22:39:28 +0000 (22:39 +0000)] 
smtp: Support the SMTPUTF8 extension in the RCPT TO command

Note: The RCPT TO command isn't required to advertise to the server that
it contains UTF-8 characters, instead the server is told that a mail may
contain UTF-8 in any envelope command via the MAIL command.

5 years agosmtp: Support the SMTPUTF8 extension in the MAIL command
Steve Holme [Thu, 13 Feb 2020 20:59:36 +0000 (20:59 +0000)] 
smtp: Support the SMTPUTF8 extension in the MAIL command

Support the SMTPUTF8 extension when sending mailbox information in the
MAIL command (FROM and AUTH parameters). Non-ASCII domain names will
be ACE encoded, if IDN is supported, whilst non-ASCII characters in
the local address part are passed to the server.

Reported-by: ygthien on github
Fixes #4828

5 years agosmtp: Detect server support for the UTF-8 extension as defined in RFC-6531
Steve Holme [Fri, 7 Feb 2020 19:57:15 +0000 (19:57 +0000)] 
smtp: Detect server support for the UTF-8 extension as defined in RFC-6531

5 years agosmtp: Support UTF-8 based host names in the VRFY command
Steve Holme [Sat, 8 Feb 2020 00:37:03 +0000 (00:37 +0000)] 
smtp: Support UTF-8 based host names in the VRFY command

5 years agosmtp: Support UTF-8 based host names in the RCPT TO command
Steve Holme [Sat, 8 Feb 2020 00:14:57 +0000 (00:14 +0000)] 
smtp: Support UTF-8 based host names in the RCPT TO command

5 years agosmtp: Support UTF-8 based host names in the MAIL command
Steve Holme [Fri, 7 Feb 2020 15:53:25 +0000 (15:53 +0000)] 
smtp: Support UTF-8 based host names in the MAIL command

Non-ASCII host names will be ACE encoded if IDN is supported.

5 years agourl: Make the IDN conversion functions available to others
Steve Holme [Fri, 7 Feb 2020 15:09:41 +0000 (15:09 +0000)] 
url: Make the IDN conversion functions available to others

5 years agosmtp: Added UTF-8 mailbox tests to verify existing behaviour
Steve Holme [Mon, 10 Feb 2020 20:48:46 +0000 (20:48 +0000)] 
smtp: Added UTF-8 mailbox tests to verify existing behaviour

5 years agoftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case
Steve Holme [Mon, 10 Feb 2020 20:49:45 +0000 (20:49 +0000)] 
ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case

5 years agoftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp()
Steve Holme [Mon, 10 Feb 2020 20:50:50 +0000 (20:50 +0000)] 
ftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp()

The dot character between the host and the tld was not being escaped,
which meant it specified a match of 'any' character rather than an
explicit dot separator.

Additionally removed the dot character from the host name as it allowed
the following to be specified as a valid address in our test cases:

<bad@example......com>

Both are typos from 98f7ca7 and 8880f84 :(

I can't remember whether my intention was to allow sub-domains to be
specified in the host or not with these additional dots, but by placing
it outside of the host means it can only be specified once per domain
and by placing a + after the new grouping support for sub-domains is
kept.

Closes #4912

5 years agohmac: Added a unit test for the HMAC hash generation
Steve Holme [Sun, 23 Feb 2020 22:54:26 +0000 (22:54 +0000)] 
hmac: Added a unit test for the HMAC hash generation

Closes #4973

5 years agontlm: Moved the HMAC MD5 function into the HMAC module as a generic function
Steve Holme [Sun, 23 Feb 2020 22:37:43 +0000 (22:37 +0000)] 
ntlm: Moved the HMAC MD5 function into the HMAC module as a generic function

5 years agotests: Added a unit test for MD4 digest generation
Steve Holme [Sun, 23 Feb 2020 04:21:49 +0000 (04:21 +0000)] 
tests: Added a unit test for MD4 digest generation

Closes #4970

5 years agomd4: Use const for the length input parameter
Steve Holme [Sun, 23 Feb 2020 18:46:24 +0000 (18:46 +0000)] 
md4: Use const for the length input parameter

This keeps the interface the same as md5 and sha256.

5 years agotest1610: Fixed the link to the unit test
Steve Holme [Sun, 23 Feb 2020 04:29:20 +0000 (04:29 +0000)] 
test1610: Fixed the link to the unit test

Typo from 81c37124.

5 years agontlm: Removed the dependency on the TLS libaries when using MD5
Steve Holme [Sat, 22 Feb 2020 14:31:26 +0000 (14:31 +0000)] 
ntlm: Removed the dependency on the TLS libaries when using MD5

As we have our own MD5 implementation use the MD5 wrapper to remove the
TLS dependency.

Closes #4967

5 years agomd5/sha256: Updated the functions to allow non-string data to be hashed
Steve Holme [Sat, 22 Feb 2020 05:37:01 +0000 (05:37 +0000)] 
md5/sha256: Updated the functions to allow non-string data to be hashed

5 years agodigest: Corrected the name of the local HTTP digest function
Steve Holme [Sat, 22 Feb 2020 04:59:46 +0000 (04:59 +0000)] 
digest: Corrected the name of the local HTTP digest function

Follow up to 2b5b37cb. Local static functions do not require the Curl
prefix.

5 years agotests: Added a unit test for SHA256 digest generation
Steve Holme [Sat, 22 Feb 2020 18:17:12 +0000 (18:17 +0000)] 
tests: Added a unit test for SHA256 digest generation

Follow up to 2b5b37c.

Closes #4968

5 years agomd4: Fixed compilation issues when using GNU TLS gcrypt
Steve Holme [Thu, 20 Feb 2020 18:55:55 +0000 (18:55 +0000)] 
md4: Fixed compilation issues when using GNU TLS gcrypt

* Don't include 'struct' in the gcrypt MD4_CTX typedef
* The call to gcry_md_read() should use a dereferenced ctx
* The call to gcry_md_close() should use a dereferenced ctx

Additional minor whitespace issue in the USE_WIN32_CRYPTO code.

Closes #4959

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 21 Feb 2020 16:07:34 +0000 (17:07 +0100)] 
RELEASE-NOTES: synced

5 years agohttp2: now require nghttp2 >= 1.12.0
Daniel Stenberg [Fri, 21 Feb 2020 10:30:05 +0000 (11:30 +0100)] 
http2: now require nghttp2 >= 1.12.0

To simplify our code and since earlier versions lack important function
calls libcurl needs to function correctly.

nghttp2 1.12.0 was relased on June 26, 2016.

Closes #4961

5 years agogtls: fix the copyright year
Daniel Stenberg [Fri, 21 Feb 2020 14:43:45 +0000 (15:43 +0100)] 
gtls: fix the copyright year

Follow-up from 41fcb4f609

5 years agoGnuTLS: Always send client cert
jethrogb [Thu, 20 Feb 2020 19:36:25 +0000 (20:36 +0100)] 
GnuTLS: Always send client cert

TLS servers may request a certificate from the client. This request
includes a list of 0 or more acceptable issuer DNs. The client may use
this list to determine which certificate to send. GnuTLS's default
behavior is to not send a client certificate if there is no
match. However, OpenSSL's default behavior is to send the configured
certificate. The `GNUTLS_FORCE_CLIENT_CERT` flag mimics OpenSSL
behavior.

Authored-by: jethrogb on github
Fixes #1411
Closes #4958

5 years agogithub action: add CIFuzz
Leo Neat [Fri, 21 Feb 2020 00:17:50 +0000 (16:17 -0800)] 
github action: add CIFuzz

Closes #4960

5 years agocleanup: comment typos
Daniel Stenberg [Thu, 20 Feb 2020 14:18:38 +0000 (15:18 +0100)] 
cleanup: comment typos

Spotted by 'codespell'

Closes #4957

5 years agowin32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions
Steve Holme [Wed, 19 Feb 2020 07:46:22 +0000 (07:46 +0000)] 
win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions

Whilst lib\md4.c used this pre-processor, lib\md5.c and
src\tool_metalink.c did not and simply relied on the WIN32
pre-processor directive.

Reviewed-by: Marcel Raad
Closes #4955

5 years agoconnect: remove some spurious infof() calls
Daniel Stenberg [Wed, 19 Feb 2020 09:30:23 +0000 (10:30 +0100)] 
connect: remove some spurious infof() calls

As they were added primarily for debugging, they provide little use for
users.

Closes #4951

5 years agoHTTP-COOKIES: mention that a trailing newline is required
Daniel Stenberg [Tue, 18 Feb 2020 13:23:04 +0000 (14:23 +0100)] 
HTTP-COOKIES: mention that a trailing newline is required

... so that we know we got the whole and not a partial line.

Also, changed the formatting of the fields away from a table again since
the table format requires a github-markdown tool version that we don't
run on the web server atm.

Reported-by: Sunny Bean
Fixes #4946
Closes #4947

5 years agonit: Copyright year out of date
Daniel Stenberg [Wed, 19 Feb 2020 06:53:54 +0000 (07:53 +0100)] 
nit: Copyright year out of date

Follow-up to 1fc0617dcc

5 years agotool_util: Improve Windows version of tvnow()
Jay Satiro [Fri, 24 Jan 2020 08:34:52 +0000 (03:34 -0500)] 
tool_util: Improve Windows version of tvnow()

- Change tool_util.c tvnow() for Windows to match more closely to
  timeval.c Curl_now().

- Create a win32 init function for the tool, since some initialization
  is required for the tvnow() changes.

Prior to this change the monotonic time function used by curl in Windows
was determined at build-time and not runtime. That was a problem because
when curl was built targeted for compatibility with old versions of
Windows (eg _WIN32_WINNT < 0x0600) it would use GetTickCount which wraps
every 49.7 days that Windows has been running.

This change makes curl behave similar to libcurl's tvnow function, which
determines at runtime whether the OS is Vista+ and if so calls
QueryPerformanceCounter instead. (Note QueryPerformanceCounter is used
because it has higher resolution than the more obvious candidate
GetTickCount64). The changes to tvnow are basically a copy and paste but
the types in some cases are different.

Ref: https://github.com/curl/curl/issues/3309

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

5 years agoSOCKS: fix typo in printf formatting
Daniel Stenberg [Tue, 18 Feb 2020 11:54:02 +0000 (12:54 +0100)] 
SOCKS: fix typo in printf formatting

Follow-up to 4a4b63daa

Reported-by: Peter Piekarski
Bug: https://github.com/curl/curl/commit/4a4b63daaa01ef59b131d91e8e6e6dfe275c0f08#r37351330

5 years agoCURLOPT_REDIR_PROTOCOLS.3: update the DEFAULT section
Daniel Stenberg [Tue, 18 Feb 2020 06:39:19 +0000 (07:39 +0100)] 
CURLOPT_REDIR_PROTOCOLS.3: update the DEFAULT section

to be in sync with the description above

Reported-by: Joonas Kuorilehto
Fixes #4943
Closes #4945

5 years agodocs/GOVERNANCE: refreshed + added "donations" and "commercial support"
Daniel Stenberg [Tue, 18 Feb 2020 08:18:28 +0000 (09:18 +0100)] 
docs/GOVERNANCE: refreshed + added "donations" and "commercial support"

5 years agoaltsvc: make saving the cache an atomic operation
Daniel Stenberg [Mon, 17 Feb 2020 22:01:48 +0000 (23:01 +0100)] 
altsvc: make saving the cache an atomic operation

... by writing the file to temp name then rename to the final when done.

Assisted-by: Jay Satiro
Fixes #4936
Closes #4942

5 years agorename: a new file for Curl_rename()
Daniel Stenberg [Mon, 17 Feb 2020 21:55:34 +0000 (22:55 +0100)] 
rename: a new file for Curl_rename()

And make the cookie save function use it.

5 years agocookies: make saving atomic with a rename
Daniel Stenberg [Fri, 14 Feb 2020 13:36:50 +0000 (14:36 +0100)] 
cookies: make saving atomic with a rename

Saves the file as "[filename].[8 random hex digits].tmp" and renames
away the extension when done.

Co-authored-by: Jay Satiro
Reported-by: Mike Frysinger
Fixes #4914
Closes #4926

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 17 Feb 2020 09:58:48 +0000 (10:58 +0100)] 
RELEASE-NOTES: synced

5 years agosocks: make the connect phase non-blocking
Daniel Stenberg [Fri, 14 Feb 2020 15:16:54 +0000 (16:16 +0100)] 
socks: make the connect phase non-blocking

Removes two entries from KNOWN_BUGS.

Closes #4907

5 years agomulti: if Curl_readwrite sets 'comeback' use expire, not loop
Daniel Stenberg [Fri, 14 Feb 2020 15:54:06 +0000 (16:54 +0100)] 
multi: if Curl_readwrite sets 'comeback' use expire, not loop

Otherwise, a very fast single transfer ricks starving out other
concurrent transfers.

Closes #4927

5 years agoftp: convert 'sock_accepted' to a plain boolean
Daniel Stenberg [Fri, 14 Feb 2020 23:00:45 +0000 (00:00 +0100)] 
ftp: convert 'sock_accepted' to a plain boolean

This was an array indexed with sockindex but it was only ever used for
the secondary socket.

Closes #4929

5 years agoCURLINFO_COOKIELIST.3: Fix example
Jay Satiro [Sat, 15 Feb 2020 23:17:31 +0000 (18:17 -0500)] 
CURLINFO_COOKIELIST.3: Fix example

Prior to this change the example would try to import cookies from stdin,
which wasn't what was intended.

Reported-by: 3dyd@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4930

5 years agoTODO: Paged searches on LDAP server
Daniel Stenberg [Fri, 14 Feb 2020 22:05:38 +0000 (23:05 +0100)] 
TODO: Paged searches on LDAP server

Closes #4452

5 years agoTODO: CURLOPT_SSL_CTX_FUNCTION for LDAPS
Daniel Stenberg [Fri, 14 Feb 2020 22:03:21 +0000 (23:03 +0100)] 
TODO: CURLOPT_SSL_CTX_FUNCTION for LDAPS

Closes #4108

5 years agoazure: disable brotli on the macos debug-builds
Daniel Stenberg [Fri, 14 Feb 2020 13:10:56 +0000 (14:10 +0100)] 
azure: disable brotli on the macos debug-builds

Because of:

brotli/decode.h:204:33: error: variable length array used [-Werror,-Wvla]
    const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],

Closes #4925

5 years agotool_home: Fix the copyright year being out of date
Steve Holme [Thu, 13 Feb 2020 00:40:08 +0000 (00:40 +0000)] 
tool_home: Fix the copyright year being out of date

Follow up to 9dc350b6.

5 years agotool_homedir: Change GetEnv() to use libcurl's curl_getenv()
Jay Satiro [Wed, 29 Jan 2020 08:23:55 +0000 (03:23 -0500)] 
tool_homedir: Change GetEnv() to use libcurl's curl_getenv()

- Deduplicate GetEnv() code.

- On Windows change ultimate call to use Windows API
  GetEnvironmentVariable() instead of C runtime getenv().

Prior to this change both libcurl and the tool had their own GetEnv
which over time diverged. Now the tool's GetEnv is a wrapper around
curl_getenv (libcurl API function which is itself a wrapper around
libcurl's GetEnv).

Furthermore this change fixes a bug in that Windows API
GetEnvironmentVariable() is called instead of C runtime getenv() to get
the environment variable since some changes aren't always visible to the
latter.

Reported-by: Christoph M. Becker
Fixes https://github.com/curl/curl/issues/4774
Closes https://github.com/curl/curl/pull/4863

5 years agostrerror.h: Copyright year out of date
Daniel Stenberg [Wed, 12 Feb 2020 22:07:04 +0000 (23:07 +0100)] 
strerror.h: Copyright year out of date

Follow-up to 1c4fa67e8a8fcf6

5 years agostrerror: Increase STRERROR_LEN 128 -> 256
Jay Satiro [Wed, 12 Feb 2020 21:48:16 +0000 (16:48 -0500)] 
strerror: Increase STRERROR_LEN 128 -> 256

STRERROR_LEN is the constant used throughout the library to set the size
of the buffer on the stack that the curl strerror functions write to.

Prior to this change some extended length Windows error messages could
be truncated.

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

5 years agomulti: fix outdated comment
Jay Satiro [Sun, 9 Feb 2020 08:15:13 +0000 (03:15 -0500)] 
multi: fix outdated comment

- Do not say that conn->data is "cleared" by multi_done().

If the connection is in use then multi_done assigns another easy handle
still using the connection to conn->data, therefore in that case it is
not cleared.

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

5 years agoeasy: remove dead code
Jay Satiro [Sun, 9 Feb 2020 07:41:33 +0000 (02:41 -0500)] 
easy: remove dead code

multi is already assigned to data->multi by curl_multi_add_handle.

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

5 years agocreate-dirs.d: mention the mode
Daniel Stenberg [Wed, 12 Feb 2020 21:30:45 +0000 (22:30 +0100)] 
create-dirs.d: mention the mode

Reported-by: Dan Jacobson
Fixes #4766
Closes #4916

5 years agoCURLOPT_ALTSVC_CTRL.3: fix the DEFAULT wording
Daniel Stenberg [Tue, 11 Feb 2020 14:42:25 +0000 (15:42 +0100)] 
CURLOPT_ALTSVC_CTRL.3: fix the DEFAULT wording

Assisted-by: Jay Satiro
Reported-by: Craig Andrews
Fixes #4909
Closes #4910

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 10 Feb 2020 07:49:27 +0000 (08:49 +0100)] 
RELEASE-NOTES: synced

5 years agosmtp: Simplify the MAIL command and avoid a duplication of send strings
Steve Holme [Sun, 9 Feb 2020 15:50:57 +0000 (15:50 +0000)] 
smtp: Simplify the MAIL command and avoid a duplication of send strings

This avoids the duplication of strings when the optional AUTH and SIZE
parameters are required. It also assists with the modifications that
are part of #4892.

Closes #4903

5 years agoaltsvc: keep a copy of the file name to survive handle reset
Daniel Stenberg [Sun, 9 Feb 2020 14:28:03 +0000 (15:28 +0100)] 
altsvc: keep a copy of the file name to survive handle reset

The alt-svc cache survives a call to curl_easy_reset fine, but the file
name to use for saving the cache was cleared. Now the alt-svc cache has
a copy of the file name to survive handle resets.

Added test 1908 to verify.

Reported-by: Craig Andrews
Fixes #4898
Closes #4902

5 years agourl: Include the failure reason when curl_win32_idn_to_ascii() fails
Steve Holme [Sun, 9 Feb 2020 04:37:52 +0000 (04:37 +0000)] 
url: Include the failure reason when curl_win32_idn_to_ascii() fails

Provide the failure reason in the failf() info just as we do for the
libidn2 version of code.

Closes #4899

5 years agoasyn-thread: remove dead code
Jay Satiro [Sun, 9 Feb 2020 07:25:44 +0000 (02:25 -0500)] 
asyn-thread: remove dead code

5 years agogithub: Instructions to post "uname -a" on Unix systems in issues
Emil Engler [Sat, 8 Feb 2020 10:23:54 +0000 (11:23 +0100)] 
github: Instructions to post "uname -a" on Unix systems in issues

Closes #4896

5 years agoconfigure.ac: fix comments about --with-quiche
Cristian Greco [Sat, 8 Feb 2020 14:28:33 +0000 (14:28 +0000)] 
configure.ac: fix comments about --with-quiche

A simple s/nghttp3/quiche in some comments of --with-quiche.
Looks like a copy-paste error from --with-nghttp3.

Closes #4897

5 years agochecksrc.bat: Fix not being able to run script from the main curl directory
Steve Holme [Fri, 7 Feb 2020 16:51:09 +0000 (16:51 +0000)] 
checksrc.bat: Fix not being able to run script from the main curl directory

If the script was ran from the main curl directory rather then the
projects directory then the script would simply exit without error:

C:\url> projects\checksrc.bat

The user would either need to change to the projects directory,
explicitly specify the current working directory, or perform a
oneline hacky workaround:

C:\url> cd projects
C:\url\projects> checksrc.bat

C:\url> checksrc.bat %cd%

C:\url> pushd projects & checksrc.bat & popd

Closes #4894

5 years agodigest: Do not quote algorithm in HTTP authorisation
Pierre-Yves Bigourdan [Thu, 6 Feb 2020 15:43:06 +0000 (15:43 +0000)] 
digest: Do not quote algorithm in HTTP authorisation

RFC 7616 section 3.4 (The Authorization Header Field) states that "For
historical reasons, a sender MUST NOT generate the quoted string syntax
for the following parameters: algorithm, qop, and nc". This removes the
quoting for the algorithm parameter.

Reviewed-by: Steve Holme
Closes #4890

5 years agoftp: remove the duplicated user/password struct fields
Daniel Stenberg [Thu, 6 Feb 2020 14:59:18 +0000 (15:59 +0100)] 
ftp: remove the duplicated user/password struct fields

Closes #4887

5 years agoftp: remove superfluous checking for crlf in user or pwd
Daniel Stenberg [Thu, 6 Feb 2020 10:36:53 +0000 (11:36 +0100)] 
ftp: remove superfluous checking for crlf in user or pwd

... as this is already done much earlier in the URL parser.

Also add test case 894 that verifies that pop3 with an encodedd CR in
the user name is rejected.

Closes #4887

5 years agontlm_wb: Use Curl_socketpair() for greater portability
Steve Holme [Wed, 5 Feb 2020 16:08:56 +0000 (16:08 +0000)] 
ntlm_wb: Use Curl_socketpair() for greater portability

Reported-by: Daniel Stenberg
Closes #4886

5 years agocontributors: Also include people who contributed to curl-www
Frank Gevaerts [Wed, 5 Feb 2020 10:45:47 +0000 (11:45 +0100)] 
contributors: Also include people who contributed to curl-www

Closes #4884

5 years agocontrithanks: Use the most recent tag by default
Frank Gevaerts [Wed, 5 Feb 2020 10:34:07 +0000 (11:34 +0100)] 
contrithanks: Use the most recent tag by default

(similar to 5296abe)

Closes #4883

5 years agoscripts: use last set tag if none given
Daniel Stenberg [Wed, 5 Feb 2020 06:48:18 +0000 (07:48 +0100)] 
scripts: use last set tag if none given

Makes 'delta' and 'contributors.sh' easier to use.

Make the delta script invoke contrithanks to get current number of
contributors instead of counting THANKS, for accuracy.

Closes #4881

5 years agoftp: shrink temp buffers used for PORT
Daniel Stenberg [Tue, 4 Feb 2020 22:27:39 +0000 (23:27 +0100)] 
ftp: shrink temp buffers used for PORT

These two stack based buffers only need to be 46 + 66 bytes instead of
256 + 1024.

Closes #4880

5 years agocurl: error on --alt-svc use w/o support
Daniel Stenberg [Tue, 4 Feb 2020 16:32:55 +0000 (17:32 +0100)] 
curl: error on --alt-svc use w/o support

Make the tool check for alt-svc support at run-time and return error
accordingly if not present when the option is used.

Reported-by: Harry Sintonen
Closes #4878

5 years agodocs/HTTP3: add --enable-alt-svc to curl's configure
Daniel Stenberg [Tue, 4 Feb 2020 23:25:12 +0000 (00:25 +0100)] 
docs/HTTP3: add --enable-alt-svc to curl's configure

5 years agoRELEASE-PROCEDURE: feature win is closed post-release a few days
Daniel Stenberg [Tue, 4 Feb 2020 15:29:28 +0000 (16:29 +0100)] 
RELEASE-PROCEDURE: feature win is closed post-release a few days

We've tried to uphold this already but let's make it official by
publicly stating this is the way we do it.

Closes #4877

5 years agoaltsvc: set h3 version at a common single spot
Daniel Stenberg [Tue, 4 Feb 2020 14:12:44 +0000 (15:12 +0100)] 
altsvc: set h3 version at a common single spot

... and move the #ifdefs out of the functions. Addresses the fact they
were different before this change.

Reported-by: Harry Sintonen
Closes #4876

5 years agoaltsvc: improved header parser
Harry Sintonen [Tue, 4 Feb 2020 04:21:58 +0000 (06:21 +0200)] 
altsvc: improved header parser

- Fixed the flag parsing to apply to specific alternative entry only, as
per RFC. The earlier code would also get totally confused by
multiprotocol header, parsing flags from the wrong part of the header.

- Fixed the parser terminating on unknown protocols, instead of skipping
them.

- Fixed a busyloop when protocol-id was present without an equal sign.

Closes #4875

5 years agongtcp2: fixed to only use AF_INET6 when ENABLE_IPV6
Harry Sintonen [Mon, 3 Feb 2020 22:58:38 +0000 (00:58 +0200)] 
ngtcp2: fixed to only use AF_INET6 when ENABLE_IPV6

5 years agodocs/HTTP3: update the OpenSSL branch to use for ngtcp2
Daniel Stenberg [Tue, 4 Feb 2020 14:05:57 +0000 (15:05 +0100)] 
docs/HTTP3: update the OpenSSL branch to use for ngtcp2

Reported-by: James Fuller
5 years agontlm: Pass the Curl_easy structure to the private winbind functions
Steve Holme [Wed, 8 May 2019 08:36:51 +0000 (09:36 +0100)] 
ntlm: Pass the Curl_easy structure to the private winbind functions

...rather than the full conndata structure.

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 4 Feb 2020 09:33:38 +0000 (10:33 +0100)] 
RELEASE-NOTES: synced

5 years agotool_operhlp: Copyright year out of date, should be 2020
Daniel Stenberg [Tue, 4 Feb 2020 07:29:41 +0000 (08:29 +0100)] 
tool_operhlp: Copyright year out of date, should be 2020

Follow-up from 2bc373740a3

5 years agocurl: avoid using strlen for testing if a string is empty
Orgad Shaneh [Mon, 3 Feb 2020 09:42:46 +0000 (11:42 +0200)] 
curl: avoid using strlen for testing if a string is empty

Closes #4873

5 years agontlm: Ensure the HTTP header data is not stored in the challenge/response
Steve Holme [Wed, 8 May 2019 23:30:09 +0000 (00:30 +0100)] 
ntlm: Ensure the HTTP header data is not stored in the challenge/response

5 years agoopenssl: remove redundant assignment
Marcel Raad [Sun, 2 Feb 2020 12:35:54 +0000 (13:35 +0100)] 
openssl: remove redundant assignment

Fixes a scan-build failure on Bionic.

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

5 years agotravis: update non-OpenSSL Linux jobs to Bionic
Marcel Raad [Sun, 2 Feb 2020 08:56:21 +0000 (09:56 +0100)] 
travis: update non-OpenSSL Linux jobs to Bionic

For the OpenSSL builds, test 323 [TLS-SRP to non-TLS-SRP server] is
failing with "curl returned 52, when expecting 35".

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

5 years agocirrus: Add some missing semicolons
Dan Fandrich [Mon, 3 Feb 2020 11:27:30 +0000 (12:27 +0100)] 
cirrus: Add some missing semicolons

Newlines aren't preserved in this section so they're needed to separate
commands. The exports luckily worked anyway as a single long line, but
erroneously exported a variable called "export"
[skip ci]