]> granicus.if.org Git - curl/log
curl
6 years agoschannel: add client certificate authentication
Archangel_SDY [Sat, 10 Mar 2018 15:40:00 +0000 (23:40 +0800)]
schannel: add client certificate authentication

Users can now specify a client certificate in system certificates store
explicitly using expression like `--cert "CurrentUser\MY\<thumbprint>"`

Closes #2376

6 years agontlm_sspi: fix authentication using Credential Manager
toughengineer [Sat, 8 Jul 2017 00:10:08 +0000 (02:10 +0200)]
ntlm_sspi: fix authentication using Credential Manager

If you pass empty user/pass asking curl to use Windows Credential
Storage (as stated in the docs) and it has valid credentials for the
domain, e.g.
curl -v -u : --ntlm example.com
currently authentication fails.
This change fixes it by providing proper SPN string to the SSPI API
calls.

Fixes https://github.com/curl/curl/issues/1622
Closes https://github.com/curl/curl/pull/1660

6 years agoconfigure: keep LD_LIBRARY_PATH changes local
Daniel Stenberg [Fri, 13 Apr 2018 12:07:39 +0000 (14:07 +0200)]
configure: keep LD_LIBRARY_PATH changes local

... only set it when we actually have to run tests to reduce its impact
on for example build commands etc.

Fixes #2490
Closes #2492

Reported-by: Dmitry Mikhirev
6 years agourldata: make service names unconditional
Marcel Raad [Tue, 10 Apr 2018 06:50:29 +0000 (08:50 +0200)]
urldata: make service names unconditional

The ifdefs have become quite long. Also, the condition for the
definition of CURLOPT_SERVICE_NAME and for setting it from
CURLOPT_SERVICE_NAME have diverged. We will soon also need the two
options for NTLM, at least when using SSPI, for
https://github.com/curl/curl/pull/1660.
Just make the definitions unconditional to make that easier.

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

6 years agotest1148: tolerate progress updates better
Daniel Stenberg [Thu, 12 Apr 2018 15:56:13 +0000 (17:56 +0200)]
test1148: tolerate progress updates better

Fixes #2446
Closes #2488

6 years agossh: show libSSH2 error code when closing fails
Christian Schmitz [Sun, 15 Apr 2018 08:49:30 +0000 (10:49 +0200)]
ssh: show libSSH2 error code when closing fails

Closes #2500

6 years agovauth: Fix typo
Daniel Gustafsson [Sat, 14 Apr 2018 19:52:00 +0000 (21:52 +0200)]
vauth: Fix typo

Address various spellings of "credentials".

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

6 years agosystem.h: Add sparcv8plus to oracle/sunpro 32-bit detection
Dagobert Michelsen [Fri, 13 Apr 2018 09:57:48 +0000 (11:57 +0200)]
system.h: Add sparcv8plus to oracle/sunpro 32-bit detection

With specific compiler options selecting the arch like -xarch=sparc on
newer compilers like Oracle Studio 12.4 there is no definition of
__sparcv8 but __sparcv8plus which means the V9 ISA, but limited to the
32ÎíÎñbit subset defined by the V8plus ISA specification, without the
Visual Instruction Set (VIS), and without other implementation-specific
ISA extensions. So it should be the same as __sparcv8.

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

6 years agochecksrc: Fix typo
Daniel Gustafsson [Sat, 14 Apr 2018 22:47:36 +0000 (00:47 +0200)]
checksrc: Fix typo

Fix typo in "semicolon" spelling and remove stray tab character.

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

6 years agoall: Refactor malloc+memset to use calloc
Daniel Gustafsson [Sat, 14 Apr 2018 20:42:04 +0000 (22:42 +0200)]
all: Refactor malloc+memset to use calloc

When a zeroed out allocation is required, use calloc() rather than
malloc() followed by an explicit memset(). The result will be the
same, but using calloc() everywhere increases consistency in the
codebase and avoids the risk of subtle bugs when code is injected
between malloc and memset by accident.

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

6 years agoduphandle: make sure CURLOPT_RESOLVE is duplicated fine too
Daniel Stenberg [Thu, 12 Apr 2018 11:09:04 +0000 (13:09 +0200)]
duphandle: make sure CURLOPT_RESOLVE is duplicated fine too

Verified in test 1502 now

Fixes #2485
Closes #2486
Reported-by: Ernst Sjöstrand
6 years agomailmap: add a monnerat fixup [ci skip]
Daniel Stenberg [Thu, 12 Apr 2018 06:02:40 +0000 (08:02 +0200)]
mailmap: add a monnerat fixup [ci skip]

6 years agoproxy: show getenv proxy use in verbose output
Daniel Stenberg [Tue, 10 Apr 2018 19:30:28 +0000 (21:30 +0200)]
proxy: show getenv proxy use in verbose output

... to aid debugging etc as it sometimes isn't immediately obvious why
curl uses or doesn't use a proxy.

Inspired by #2477

Closes #2480

6 years agotravis: build libpsl and make builds use it
Daniel Stenberg [Sun, 8 Apr 2018 22:11:04 +0000 (00:11 +0200)]
travis: build libpsl and make builds use it

closes #2471

6 years agotravis: bump to clang 6 and gcc 7
Daniel Stenberg [Mon, 9 Apr 2018 18:30:57 +0000 (20:30 +0200)]
travis: bump to clang 6 and gcc 7

Extra-eye-on-this-by: Marcel Raad
Closes #2478

6 years agotravis: use trusty for coverage build
Marcel Raad [Thu, 20 Jul 2017 13:22:29 +0000 (15:22 +0200)]
travis: use trusty for coverage build

This works now and precise is in the process of being decommissioned.

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

6 years agolib: silence null-dereference warnings
Marcel Raad [Mon, 9 Apr 2018 13:53:12 +0000 (15:53 +0200)]
lib: silence null-dereference warnings

In debug mode, MingGW-w64's GCC 7.3 issues null-dereference warnings
when dereferencing pointers after DEBUGASSERT-ing that they are not
NULL.
Fix this by removing the DEBUGASSERTs.

Suggested-by: Daniel Stenberg
Ref: https://github.com/curl/curl/pull/2463

6 years agowinbuild: fix URL
kdekker [Mon, 9 Apr 2018 10:10:43 +0000 (12:10 +0200)]
winbuild: fix URL

Follow up on https://github.com/curl/curl/pull/2472.
Now using en-us instead of nl-nl as language code in the URL.

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

6 years agowinbuild: updated the documentation
kdekker [Mon, 9 Apr 2018 08:42:14 +0000 (10:42 +0200)]
winbuild: updated the documentation

The setenv command no longer exists and visual studio build prompts got
changed. Used Visual Studio 2015/2017 as reference.

Closes #2472

6 years agotest1136: fix cookie order after commit c990eadd1277
Daniel Stenberg [Sun, 8 Apr 2018 22:10:20 +0000 (00:10 +0200)]
test1136: fix cookie order after commit c990eadd1277

6 years agobuild: cleanup to fix clang warnings/errors
Daniel Stenberg [Sat, 7 Apr 2018 09:03:18 +0000 (11:03 +0200)]
build: cleanup to fix clang warnings/errors

unit1309 and vtls/gtls: error: arithmetic on a null pointer treated as a
cast from integer to pointer is a GNU extension

Reported-by: Rikard Falkeborn
Fixes #2466
Closes #2468

6 years agoexamples/sftpuploadresmue: Fix Windows large file seek
Jay Satiro [Sat, 7 Apr 2018 20:03:55 +0000 (16:03 -0400)]
examples/sftpuploadresmue: Fix Windows large file seek

- Use _fseeki64 instead of fseek (long) to seek curl_off_t in Windows.

- Use CURL_FORMAT_CURL_OFF_T specifier instead of %ld to print
  curl_off_t.

Caught by Marc's CI builds.

6 years agocurl_setup: provide a CURL_SA_FAMILY_T type if none exists
Daniel Stenberg [Fri, 6 Apr 2018 13:26:04 +0000 (15:26 +0200)]
curl_setup: provide a CURL_SA_FAMILY_T type if none exists

... and use this type instead of 'sa_family_t' in the code since several
platforms don't have it.

Closes #2463

6 years agobuild: add picky compiler warning flags for gcc 6 and 7
Eric Gallager [Mon, 12 Feb 2018 06:42:47 +0000 (01:42 -0500)]
build: add picky compiler warning flags for gcc 6 and 7

6 years agoconfigure: detect sa_family_t
Daniel Stenberg [Mon, 26 Mar 2018 14:01:07 +0000 (16:01 +0200)]
configure: detect sa_family_t

6 years agotool_operate: Fix retry on FTP 4xx to ignore other protocols
Stefan Agner [Fri, 6 Apr 2018 19:00:02 +0000 (21:00 +0200)]
tool_operate: Fix retry on FTP 4xx to ignore other protocols

Only treat response code as FTP response codes in case the
protocol type is FTP.

This fixes an issue where an HTTP download was treated as FTP
in case libcurl returned with 33. This happens when the
download has already finished and the server responses 416:
  HTTP/1.1 416 Requested Range Not Satisfiable

This should not be treated as an FTP error.

Fixes #2464
Closes #2465

6 years agohash: calculate sizes with size_t instead of longs
Daniel Stenberg [Fri, 6 Apr 2018 12:19:39 +0000 (14:19 +0200)]
hash: calculate sizes with size_t instead of longs

... since they return size_t anyway!

closes #2462

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 6 Apr 2018 13:52:10 +0000 (15:52 +0200)]
RELEASE-NOTES: synced

6 years agobuild-openssl.bat: Refer to VS2017 as VC14.1 instead of VC15
Jay Satiro [Fri, 22 Dec 2017 22:00:32 +0000 (17:00 -0500)]
build-openssl.bat: Refer to VS2017 as VC14.1 instead of VC15

.. and do the same for build-wolfssl.bat.

Because MS calls it VC14.1.

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

6 years agowinbuild: make the clean target work without build-type
kdekker [Wed, 4 Apr 2018 09:32:19 +0000 (11:32 +0200)]
winbuild: make the clean target work without build-type

Due to the check in Makefile.vc and MakefileBuild.vc, no make call can
be invoked unless a build-type was specified. However, a clean target
only existed when a build type was specified. As a result, the clean
target was unreachable. Made clean target unconditional.

Closes #2455

6 years agobuild-openssl.bat: allow custom paths for VS and perl
patelvivekv1993 [Thu, 5 Apr 2018 11:06:05 +0000 (16:36 +0530)]
build-openssl.bat: allow custom paths for VS and perl

Fixes #2430
Closes #2457

6 years agoFTP: allow PASV on IPv6 connections when a proxy is being used
Laurie Clark-Michalek [Wed, 28 Mar 2018 14:42:33 +0000 (15:42 +0100)]
FTP: allow PASV on IPv6 connections when a proxy is being used

In the situation of a client connecting to an FTP server using an IPv6
tunnel proxy, the connection info will indicate that the connection is
IPv6. However, because the server behing the proxy is IPv4, it is
permissable to attempt PSV mode. In the case of the FTP server being
IPv4 only, EPSV will always fail, and with the current logic curl will
be unable to connect to the server, as the IPv6 fwdproxy causes curl to
think that EPSV is impossible.

Closes #2432

6 years agofile: restore old behavior for file:////foo/bar URLs
Jon DeVree [Thu, 29 Mar 2018 22:39:56 +0000 (18:39 -0400)]
file: restore old behavior for file:////foo/bar URLs

curl 7.57.0 and up interpret this according to Appendix E.3.2 of RFC
8089 but then returns an error saying this is unimplemented. This is
actually a regression in behavior on both Windows and Unix.

Before curl 7.57.0 this URL was treated as a path of "//foo/bar" and
then passed to the relevant OS API. This means that the behavior of this
case is actually OS dependent.

The Unix path resolution rules say that the OS must handle swallowing
the extra "/" and so this path is the same as "/foo/bar"

The Windows path resolution rules say that this is a UNC path and
automatically handles the SMB access for the program. So curl on Windows
was already doing Appendix E.3.2 without any special code in curl.

Regression

Closes #2438

6 years agoRevert "openssl: Don't add verify locations when verifypeer==0"
Gaurav Malhotra [Tue, 3 Apr 2018 12:41:27 +0000 (18:11 +0530)]
Revert "openssl: Don't add verify locations when verifypeer==0"

This reverts commit dc85437736e1fc90e689bb1f6c51c8f1aa9430eb.

libcurl (with the OpenSSL backend) performs server certificate verification
even if verifypeer == 0 and the verification result is available using
CURLINFO_SSL_VERIFYRESULT. The commit that is being reverted caused the
CURLINFO_SSL_VERIFYRESULT to not have useful information for the
verifypeer == 0 use case (it would always have
X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY).

Closes #2451

6 years agotls: fix mbedTLS 2.7.0 build + handle sha256 failures
Wyatt O'Day [Mon, 2 Apr 2018 17:33:00 +0000 (13:33 -0400)]
tls: fix mbedTLS 2.7.0 build + handle sha256 failures

(mbedtls 2.70 compiled with MBEDTLS_DEPRECATED_REMOVED)

Closes #2453

6 years agocookie: case-insensitive hashing for the domains
Lauri Kasanen [Thu, 5 Apr 2018 12:55:59 +0000 (15:55 +0300)]
cookie: case-insensitive hashing for the domains

closes #2458

6 years agocookie: fix and optimize 2nd top level domain name extraction
Patrick Monnerat [Wed, 4 Apr 2018 13:28:28 +0000 (15:28 +0200)]
cookie: fix and optimize 2nd top level domain name extraction

This fixes a segfault occurring when a name of the (invalid) form "domain..tld"
is processed.

test46 updated to cover this case.

Follow-up to commit c990ead.

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

6 years agoopenssl: provide defines for argument typecasts to build warning-free
Daniel Stenberg [Wed, 4 Apr 2018 08:55:56 +0000 (10:55 +0200)]
openssl: provide defines for argument typecasts to build warning-free

... as OpenSSL >= 1.1.0 and libressl >= 2.7.0 use different argument types.

6 years agoopenssl: fix build with LibreSSL 2.7
Bernard Spil [Mon, 2 Apr 2018 17:04:06 +0000 (19:04 +0200)]
openssl: fix build with LibreSSL 2.7

 - LibreSSL 2.7 implements (most of) OpenSSL 1.1 API

Fixes #2319
Closes #2447
Closes #2448

Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
6 years agocookie: store cookies per top-level-domain-specific hash table
Lauri Kasanen [Fri, 30 Mar 2018 14:35:46 +0000 (17:35 +0300)]
cookie: store cookies per top-level-domain-specific hash table

This makes libcurl handle thousands of cookies much better and speedier.

Closes #2440

6 years agocookies: when reading from a file, only remove_expired once
Lauri Kasanen [Fri, 30 Mar 2018 15:33:52 +0000 (18:33 +0300)]
cookies: when reading from a file, only remove_expired once

This drops the cookie load time for 8k cookies from 178ms to 15ms.

Closes #2441

6 years agotest1148: set a fixed locale for the test
Daniel Stenberg [Mon, 2 Apr 2018 08:30:16 +0000 (10:30 +0200)]
test1148: set a fixed locale for the test

...as otherwise it might use a different decimal sign.

Bug: #2436
Reported-by: Oumph on github
6 years agodocs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T
Jay Satiro [Sat, 31 Mar 2018 18:51:55 +0000 (14:51 -0400)]
docs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T

- Put a percent sign before each CURL_FORMAT_CURL_OFF_T in printf.

For example "%" CURL_FORMAT_CURL_OFF_T becomes %lld or similar.

Bug: https://curl.haxx.se/mail/lib-2018-03/0140.html
Reported-by: David L.
6 years agocmake: Add advapi32 as explicit link library for win32
Michał Janiszewski [Tue, 27 Mar 2018 13:22:37 +0000 (15:22 +0200)]
cmake: Add advapi32 as explicit link library for win32

ARM targets need advapi32 explicitly.

Closes #2363

6 years agoTODO: connection cache sharing is now supporte
Daniel Stenberg [Sun, 25 Mar 2018 21:55:48 +0000 (23:55 +0200)]
TODO: connection cache sharing is now supporte

6 years agotravis: enable apt retry on fail
Jay Satiro [Mon, 26 Mar 2018 22:29:30 +0000 (18:29 -0400)]
travis: enable apt retry on fail

This is a workaround for an unsolved travis issue that is causing CI
instances to sporadically fail due to 'unable to connect' issues during
apt stage.

Ref: https://github.com/travis-ci/travis-ci/issues/8507
Ref: https://github.com/travis-ci/travis-ci/issues/9112#issuecomment-376305909

6 years agoruntests.pl: fix warning 'use of uninitialized value'
Michael Kaufmann [Sun, 25 Mar 2018 17:56:01 +0000 (19:56 +0200)]
runtests.pl: fix warning 'use of uninitialized value'

follow-up to a9a7b60

Closes #2428

6 years agogitignore: ignore more generated files
Daniel Stenberg [Fri, 23 Mar 2018 23:24:24 +0000 (00:24 +0100)]
gitignore: ignore more generated files

6 years agothreaded resolver: track resolver time and set suitable timeout values
Daniel Stenberg [Thu, 22 Mar 2018 16:59:58 +0000 (17:59 +0100)]
threaded resolver: track resolver time and set suitable timeout values

In order to make curl_multi_timeout() return suitable "sleep" times even
when there's no socket to wait for while the name is being resolved in a
helper thread.

It will increases the timeouts as time passes.

Closes #2419

6 years agoopenldap: fix for NULL return from ldap_get_attribute_ber()
Howard Chu [Sun, 18 Mar 2018 18:13:27 +0000 (18:13 +0000)]
openldap: fix for NULL return from ldap_get_attribute_ber()

Closes #2399

6 years agotravis-ci: enable -Werror for CMake builds (#2418)
Sergei Nikulov [Thu, 22 Mar 2018 13:35:33 +0000 (16:35 +0300)]
travis-ci: enable -Werror for CMake builds (#2418)

6 years agocmake: avoid warn-as-error during config checks (#2411)
Sergei Nikulov [Thu, 22 Mar 2018 13:34:49 +0000 (16:34 +0300)]
cmake: avoid warn-as-error during config checks (#2411)

- Move the CURL_WERROR option processing after the configuration checks
  to avoid failures in case of warnings during the configuration checks.

This is a partial fix for #2358

6 years agotimeval: remove compilation warning by casting (#2417)
Sergei Nikulov [Thu, 22 Mar 2018 13:34:11 +0000 (16:34 +0300)]
timeval: remove compilation warning by casting (#2417)

This is fixes #2358

6 years agohttp2: read pending frames (including GOAWAY) in connection-check
Daniel Stenberg [Mon, 19 Mar 2018 15:28:05 +0000 (16:28 +0100)]
http2: read pending frames (including GOAWAY) in connection-check

If a connection has received a GOAWAY frame while not being used, the
function now reads frames off the connection before trying to reuse it
to avoid reusing connections the server has told us not to use.

Reported-by: Alex Baines
Fixes #1967
Closes #2402

6 years agoCI: add lgtm.yml for tweaking lgtm.com analysis
Bas van Schaik [Wed, 21 Mar 2018 12:27:28 +0000 (12:27 +0000)]
CI: add lgtm.yml for tweaking lgtm.com analysis

Closes #2414

6 years agoCURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text
Daniel Stenberg [Wed, 21 Mar 2018 00:03:07 +0000 (01:03 +0100)]
CURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text

Reported-by: Michal Trybus
Fixes #2400

6 years agoTODO: expand ~/ in config files
Daniel Stenberg [Tue, 20 Mar 2018 23:49:49 +0000 (00:49 +0100)]
TODO: expand ~/ in config files

Closes #2317

6 years agocookie.d: mention that "-" as filename means stdin
Daniel Stenberg [Tue, 20 Mar 2018 22:25:12 +0000 (23:25 +0100)]
cookie.d: mention that "-" as filename means stdin

Reported-by: Dongliang Mu
Fixes #2410

6 years agoCURLINFO_COOKIELIST.3: made the example not leak memory
Daniel Stenberg [Tue, 20 Mar 2018 22:18:23 +0000 (23:18 +0100)]
CURLINFO_COOKIELIST.3: made the example not leak memory

Reported-by: Muz Dima
6 years agovauth/cleartext: fix integer overflow check
Daniel Stenberg [Tue, 20 Mar 2018 14:15:14 +0000 (15:15 +0100)]
vauth/cleartext: fix integer overflow check

Make the integer overflow check not rely on the undefined behavior that
a size_t wraps around on overflow.

Detected by lgtm.com
Closes #2408

6 years agolib/curl_path.h: add #ifdef header guard
Daniel Stenberg [Tue, 20 Mar 2018 13:37:29 +0000 (14:37 +0100)]
lib/curl_path.h: add #ifdef header guard

Detected by lgtm.com

6 years agovauth/ntlm.h: fix the #ifdef header guard
Daniel Stenberg [Tue, 20 Mar 2018 13:28:38 +0000 (14:28 +0100)]
vauth/ntlm.h: fix the #ifdef header guard

Detected by lgtm.com

6 years agoexamples/hiperfifo: checksrc compliance
Jay Satiro [Tue, 20 Mar 2018 07:12:35 +0000 (03:12 -0400)]
examples/hiperfifo: checksrc compliance

6 years agoparsedate: support UT timezone
Nikos Tsipinakis [Mon, 19 Mar 2018 13:42:36 +0000 (15:42 +0200)]
parsedate: support UT timezone

RFC822 section 5.2 mentions Universal Time, 'UT', to be synonymous with
GMT.

Closes #2401

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 19 Mar 2018 08:21:18 +0000 (09:21 +0100)]
RELEASE-NOTES: synced

6 years agocmake: add support for brotli
Don [Fri, 16 Mar 2018 19:49:13 +0000 (12:49 -0700)]
cmake: add support for brotli

Currently CMake cannot detect Brotli support. This adds detection of the
libraries and associated header files. It also adds this to the
generated config.

Closes #2392

6 years agodarwinssl: fix iOS build
Chris Araman [Sat, 17 Mar 2018 20:49:27 +0000 (13:49 -0700)]
darwinssl: fix iOS build

6 years agoILE/RPG binding: Add CURLOPT_HAPROXYPROTOCOL/Fix CURLOPT_DNS_SHUFFLE_ADDRESSES
Patrick Monnerat [Sun, 18 Mar 2018 00:47:05 +0000 (01:47 +0100)]
ILE/RPG binding: Add CURLOPT_HAPROXYPROTOCOL/Fix CURLOPT_DNS_SHUFFLE_ADDRESSES

6 years agoresolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES
Rick Deist [Sat, 17 Mar 2018 19:10:04 +0000 (20:10 +0100)]
resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES

This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request
shuffling of IP addresses returned for a hostname when there is more
than one. This is useful when the application knows that a round robin
approach is appropriate and is willing to accept the consequences of
potentially discarding some preference order returned by the system's
implementation.

Closes #1694

6 years agoadd_handle/easy_perform: clear errorbuffer on start if set
Daniel Stenberg [Mon, 12 Mar 2018 23:51:39 +0000 (00:51 +0100)]
add_handle/easy_perform: clear errorbuffer on start if set

To offer applications a more defined behavior, we clear the buffer as
early as possible.

Assisted-by: Jay Satiro
Fixes #2190
Closes #2377

6 years agoCURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol
Lawrence Matthews [Thu, 1 Dec 2016 12:05:04 +0000 (04:05 -0800)]
CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol

Add --haproxy-protocol for the command line tool

Closes #2162

6 years agocurl_version_info.3: fix ssl_version description
Daniel Stenberg [Sat, 17 Mar 2018 10:18:00 +0000 (11:18 +0100)]
curl_version_info.3: fix ssl_version description

Reported-by: Vincas Razma
Fixes #2364

6 years agomulti: improved pending transfers handling => improved performance
Daniel Stenberg [Tue, 13 Mar 2018 15:13:56 +0000 (16:13 +0100)]
multi: improved pending transfers handling => improved performance

When a transfer is requested to get done and it is put in the pending
queue when limited by number of connections, total or per-host, libcurl
would previously very aggressively retry *ALL* pending transfers to get
them transferring. That was very time consuming.

By reducing the aggressiveness in how pending are being retried, we
waste MUCH less time on putting transfers back into pending again.

Some test cases got a factor 30(!) speed improvement with this change.

Reported-by: Cyril B
Fixes #2369
Closes #2383

6 years agopause: when changing pause state, update socket state
Daniel Stenberg [Fri, 16 Mar 2018 11:03:52 +0000 (12:03 +0100)]
pause: when changing pause state, update socket state

Especially unpausing a transfer might have to move the socket back to the
"currently used sockets" hash to get monitored. Otherwise it would never get
any more data and get stuck. Easily triggered with pausing using the
multi_socket API.

Reported-by: Philip Prindeville
Bug: https://curl.haxx.se/mail/lib-2018-03/0048.html
Fixes #2393
Closes #2391

6 years agoexamples/hiperfifo.c: improved
Philip Prindeville [Fri, 16 Mar 2018 15:01:01 +0000 (16:01 +0100)]
examples/hiperfifo.c: improved

 * use member struct event’s instead of pointers to alloc’d struct
   events

 * simplify the cases for the mcode_or_die() function via macros;

 * make multi_timer_cb() actually do what the block comment says it
   should;

 * accept a “stop” command on the FIFO to shut down the service;

 * use cleaner notation for unused variables than the (void) hack;

 * allow following redirections (304’s);

6 years agorate-limit: use three second window to better handle high speeds
Daniel Stenberg [Thu, 15 Mar 2018 15:43:00 +0000 (16:43 +0100)]
rate-limit: use three second window to better handle high speeds

Due to very frequent updates of the rate limit "window", it could
attempt to rate limit within the same milliseconds and that then made
the calculations wrong, leading to it not behaving correctly on very
fast transfers.

This new logic updates the rate limit "window" to be no shorter than the
last three seconds and only updating the timestamps for this when
switching between the states TOOFAST/PERFORM.

Reported-by: 刘佩东
Fixes #2386
Closes #2388

6 years agocleanup: misc typos in strings and comments
luz.paz [Fri, 16 Mar 2018 02:51:03 +0000 (22:51 -0400)]
cleanup: misc typos in strings and comments

Found via `codespell`

Closes #2389

6 years agoRELEASE-NOTES: toward 7.60.0
Daniel Stenberg [Fri, 16 Mar 2018 07:28:20 +0000 (08:28 +0100)]
RELEASE-NOTES: toward 7.60.0

6 years agohttp2: fixes typo
Kobi Gurkan [Thu, 15 Mar 2018 12:34:43 +0000 (14:34 +0200)]
http2: fixes typo

Closes #2387

6 years agouser-agent.d:: mention --proxy-header as well
Daniel Stenberg [Thu, 15 Mar 2018 22:52:43 +0000 (23:52 +0100)]
user-agent.d:: mention --proxy-header as well

Bug: https://github.com/curl/curl/issues/2381

6 years agotransfer: make HTTP without headers count correct body size
Daniel Stenberg [Wed, 14 Mar 2018 23:27:20 +0000 (00:27 +0100)]
transfer: make HTTP without headers count correct body size

This is what "HTTP/0.9" basically looks like.

Reported on IRC

Closes #2382

6 years agotest1208: marked flaky
Daniel Stenberg [Thu, 15 Mar 2018 07:21:26 +0000 (08:21 +0100)]
test1208: marked flaky

It fails somewhere between every 3rd to 10th travis-CI run

6 years agoSECURITY-PROCESS: mention how we write/add advisories
Daniel Stenberg [Wed, 14 Mar 2018 13:20:24 +0000 (14:20 +0100)]
SECURITY-PROCESS: mention how we write/add advisories

6 years agoFTP: fix typo in recursive callback detection for seeking
dasimx [Wed, 14 Mar 2018 10:02:05 +0000 (11:02 +0100)]
FTP: fix typo in recursive callback detection for seeking

Fixes #2380

6 years agorelease: 7.59.0 curl-7_59_0
Daniel Stenberg [Mon, 12 Mar 2018 07:28:29 +0000 (08:28 +0100)]
release: 7.59.0

6 years agotests/.../spnego.py: fix identifier typo
Kamil Dudka [Tue, 13 Mar 2018 11:00:54 +0000 (12:00 +0100)]
tests/.../spnego.py: fix identifier typo

Detected by Coverity Analysis:

Error: IDENTIFIER_TYPO:
curl-7.58.0/tests/python_dependencies/impacket/spnego.py:229: identifier_typo: Using "SuportedMech" appears to be a typo:
* Identifier "SuportedMech" is only known to be referenced here, or in copies of this code.
* Identifier "SupportedMech" is referenced elsewhere at least 4 times.
curl-7.58.0/tests/python_dependencies/impacket/smbserver.py:2651: identifier_use: Example 1: Using identifier "SupportedMech".
curl-7.58.0/tests/python_dependencies/impacket/smbserver.py:2308: identifier_use: Example 2: Using identifier "SupportedMech".
curl-7.58.0/tests/python_dependencies/impacket/spnego.py:252: identifier_use: Example 3: Using identifier "SupportedMech" (2 total uses in this function).
curl-7.58.0/tests/python_dependencies/impacket/spnego.py:229: remediation: Should identifier "SuportedMech" be replaced by "SupportedMech"?

Closes #2379

6 years agoCURLOPT_COOKIEFILE.3: "-" as file name means stdin
Daniel Stenberg [Tue, 13 Mar 2018 12:04:12 +0000 (13:04 +0100)]
CURLOPT_COOKIEFILE.3: "-" as file name means stdin

Reported-by: Aron Bergman
Bug: https://curl.haxx.se/mail/lib-2018-03/0049.html

[ci skip]

6 years agoRevert "hostip: fix compiler warning: 'variable set but not used'"
Daniel Stenberg [Mon, 12 Mar 2018 22:52:28 +0000 (23:52 +0100)]
Revert "hostip: fix compiler warning: 'variable set but not used'"

This reverts commit a577059f92fc65bd6b81717f0737f897a5b34248.

The assignment really needs to be there or we risk working with an
uninitialized pointer.

6 years agolimit-rate: fix compiler warning
Michael Kaufmann [Mon, 12 Mar 2018 20:26:31 +0000 (21:26 +0100)]
limit-rate: fix compiler warning

follow-up to 72a0f62

6 years agochecksrc.pl: add -i and -m options
Viktor Szakats [Mon, 12 Mar 2018 18:19:24 +0000 (18:19 +0000)]
checksrc.pl: add -i and -m options

To sync it with changes made for the libssh2 project.
Also cleanup some whitespace.

6 years agocurl-openssl.m4: fix spelling [ci skip]
Viktor Szakats [Mon, 12 Mar 2018 18:18:39 +0000 (18:18 +0000)]
curl-openssl.m4: fix spelling [ci skip]

6 years agoFAQ: fix a broken URL [ci skip]
Viktor Szakats [Mon, 12 Mar 2018 18:17:05 +0000 (18:17 +0000)]
FAQ: fix a broken URL [ci skip]

6 years agohttp2: mark the connection for close on GOAWAY
Daniel Stenberg [Sat, 10 Mar 2018 22:48:43 +0000 (23:48 +0100)]
http2: mark the connection for close on GOAWAY

... don't consider it an error!

Assisted-by: Jay Satiro
Reported-by: Łukasz Domeradzki
Fixes #2365
Closes #2375

6 years agocredits: Viktor prefers without accent
Daniel Stenberg [Mon, 12 Mar 2018 06:55:58 +0000 (07:55 +0100)]
credits: Viktor prefers without accent

6 years agoopenldap: white space changes, fixed up the copyright years
Daniel Stenberg [Wed, 7 Mar 2018 13:43:12 +0000 (14:43 +0100)]
openldap: white space changes, fixed up the copyright years

6 years agoopenldap: check ldap_get_attribute_ber() results for NULL before using
Daniel Stenberg [Tue, 6 Mar 2018 22:02:16 +0000 (23:02 +0100)]
openldap: check ldap_get_attribute_ber() results for NULL before using

CVE-2018-1000121
Reported-by: Dario Weisser
Bug: https://curl.haxx.se/docs/adv_2018-97a2.html

6 years agoFTP: reject path components with control codes
Daniel Stenberg [Wed, 31 Jan 2018 07:40:11 +0000 (08:40 +0100)]
FTP: reject path components with control codes

Refuse to operate when given path components featuring byte values lower
than 32.

Previously, inserting a %00 sequence early in the directory part when
using the 'singlecwd' ftp method could make curl write a zero byte
outside of the allocated buffer.

Test case 340 verifies.

CVE-2018-1000120
Reported-by: Duy Phan Thanh
Bug: https://curl.haxx.se/docs/adv_2018-9cd6.html

6 years agoreadwrite: make sure excess reads don't go beyond buffer end
Daniel Stenberg [Thu, 8 Mar 2018 09:33:16 +0000 (10:33 +0100)]
readwrite: make sure excess reads don't go beyond buffer end

CVE-2018-1000122
Bug: https://curl.haxx.se/docs/adv_2018-b047.html

Detected by OSS-fuzz

6 years agoBUGS: updated link to security process
Daniel Stenberg [Sun, 11 Mar 2018 23:34:33 +0000 (00:34 +0100)]
BUGS: updated link to security process

6 years agolimit-rate: kick in even before "limit" data has been received
Daniel Stenberg [Sat, 10 Mar 2018 13:07:38 +0000 (14:07 +0100)]
limit-rate: kick in even before "limit" data has been received

... and make sure to avoid integer overflows with really large values.

Reported-by: 刘佩东
Fixes #2371
Closes #2373