]> granicus.if.org Git - curl/log
curl
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

6 years agodocs/SECURITY.md -> docs/SECURITY-PROCESS.md
Daniel Stenberg [Sun, 11 Mar 2018 22:41:50 +0000 (23:41 +0100)]
docs/SECURITY.md -> docs/SECURITY-PROCESS.md

6 years agoSECURITY.md: call it the security process
Daniel Stenberg [Sun, 11 Mar 2018 22:40:24 +0000 (23:40 +0100)]
SECURITY.md: call it the security process

6 years agoCurl_range: fix FTP-only and FILE-only builds
Michael Kaufmann [Sun, 11 Mar 2018 19:30:02 +0000 (20:30 +0100)]
Curl_range: fix FTP-only and FILE-only builds

follow-up to e04417d

6 years agohostip: fix compiler warning: 'variable set but not used'
Michael Kaufmann [Sun, 11 Mar 2018 19:27:09 +0000 (20:27 +0100)]
hostip: fix compiler warning: 'variable set but not used'

6 years agoHTTP: allow "header;" to replace an internal header with a blank one
Daniel Stenberg [Mon, 5 Mar 2018 22:38:16 +0000 (23:38 +0100)]
HTTP: allow "header;" to replace an internal header with a blank one

Reported-by: Michael Kaufmann
Fixes #2357
Closes #2362

6 years agohttp2: verbose output new MAX_CONCURRENT_STREAMS values
Daniel Stenberg [Sat, 10 Mar 2018 22:56:21 +0000 (23:56 +0100)]
http2: verbose output new MAX_CONCURRENT_STREAMS values

... as it is interesting for many users.

6 years agoSECURITY: distros' max embargo time is 14 days now
Daniel Stenberg [Fri, 9 Mar 2018 20:42:36 +0000 (21:42 +0100)]
SECURITY: distros' max embargo time is 14 days now

6 years agocurl tool: accept --compressed also if Brotli is enabled and zlib is not.
Patrick Monnerat [Thu, 8 Mar 2018 00:39:29 +0000 (01:39 +0100)]
curl tool: accept --compressed also if Brotli is enabled and zlib is not.

6 years agoTHANKS + mailmap: remove duplicates, fixup full names
Daniel Stenberg [Mon, 5 Mar 2018 10:48:41 +0000 (11:48 +0100)]
THANKS + mailmap: remove duplicates, fixup full names

6 years agoWolfSSL: adding TLSv1.3
sergii.kavunenko [Thu, 1 Mar 2018 18:10:36 +0000 (20:10 +0200)]
WolfSSL: adding TLSv1.3

Closes #2349

6 years agoRELEASE-NOTES/THANKS: synced with cc1d4c505
Daniel Stenberg [Sun, 4 Mar 2018 22:19:38 +0000 (23:19 +0100)]
RELEASE-NOTES/THANKS: synced with cc1d4c505

6 years agowinbuild: prefer documented zlib library names
richardthe3rd [Fri, 2 Mar 2018 22:13:42 +0000 (22:13 +0000)]
winbuild: prefer documented zlib library names

Check for existence of import and static libraries with documented names
and use them if they do. Fallback to previous names.

According to
https://github.com/madler/zlib/blob/master/win32/README-WIN32.txt on
Windows, the names of the import library is "zdll.lib" and static
library is "zlib.lib".

closes #2354

6 years agokrb5: use nondeprecated functions
Marcel Raad [Sat, 3 Mar 2018 19:25:24 +0000 (20:25 +0100)]
krb5: use nondeprecated functions

gss_seal/gss_unseal have been deprecated in favor of
gss_wrap/gss_unwrap with GSS-API v2 from January 1997 [1]. The first
version of "The Kerberos Version 5 GSS-API Mechanism" [2] from June
1996 already says "GSS_Wrap() (formerly GSS_Seal())" and
"GSS_Unwrap() (formerly GSS_Unseal())".

Use the nondeprecated functions to avoid deprecation warnings.

[1] https://tools.ietf.org/html/rfc2078
[2] https://tools.ietf.org/html/rfc1964

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

6 years agocurl.1: mention how to add numerical IP addresses in NO_PROXY
Daniel Stenberg [Sun, 4 Mar 2018 18:57:43 +0000 (19:57 +0100)]
curl.1: mention how to add numerical IP addresses in NO_PROXY

6 years agoCURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses
Daniel Stenberg [Sat, 3 Mar 2018 17:28:07 +0000 (18:28 +0100)]
CURLOPT_NOPROXY.3: mention how to list numerical IPv6 addresses

6 years agoNO_PROXY: fix for IPv6 numericals in the URL
Daniel Stenberg [Sat, 3 Mar 2018 13:12:35 +0000 (14:12 +0100)]
NO_PROXY: fix for IPv6 numericals in the URL

Added test 1265 that verifies.

Reported-by: steelman on github
Fixes #2353
Closes #2355

6 years agobuild: get CFLAGS (including -werror) used for examples and tests
Daniel Stenberg [Fri, 23 Feb 2018 22:35:23 +0000 (23:35 +0100)]
build: get CFLAGS (including -werror) used for examples and tests

... so that the CI and more detects compiler warnings/errors properly!

Closes #2337

6 years agocurl_ctype: fix macro redefinition warnings
Marcel Raad [Sat, 3 Mar 2018 18:52:43 +0000 (19:52 +0100)]
curl_ctype: fix macro redefinition warnings

On MinGW and Cygwin, GCC and clang have been complaining about macro
redefinitions since 4272a0b0fc49a1ac0ceab5c4a365c9f6ab8bf8e2. Fix this
by undefining the macros before redefining them as suggested in
https://github.com/curl/curl/pull/2269.

Suggested-by: Daniel Stenberg
6 years agounit1307: proper cleanup on OOM to fix torture tests
Dan Fandrich [Fri, 2 Mar 2018 19:51:59 +0000 (20:51 +0100)]
unit1307: proper cleanup on OOM to fix torture tests

6 years agounit1309: fix warning on Windows x64
Marcel Raad [Sun, 25 Feb 2018 20:16:32 +0000 (21:16 +0100)]
unit1309: fix warning on Windows x64

When targeting x64, MinGW-w64 complains about conversions between
32-bit long and 64-bit pointers. Fix this by reusing the
GNUTLS_POINTER_TO_SOCKET_CAST / GNUTLS_SOCKET_TO_POINTER_CAST logic
from gtls.c, moving it to warnless.h as CURLX_POINTER_TO_INTEGER_CAST /
CURLX_INTEGER_TO_POINTER_CAST.

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

6 years agotravis: update compiler versions
Marcel Raad [Tue, 27 Feb 2018 09:14:32 +0000 (10:14 +0100)]
travis: update compiler versions

Update clang to version 3.9 and GCC to version 6.

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