]> granicus.if.org Git - curl/log
curl
8 years agocurl: add --fail-early
Daniel Stenberg [Sat, 12 Nov 2016 13:19:29 +0000 (14:19 +0100)]
curl: add --fail-early

Exit with an error on the first transfer error instead of continuing to
do the rest of the URLs.

Discussion: https://curl.haxx.se/mail/archive-2016-11/0038.html

8 years agoCurl_rand: fixed and moved to rand.c
Daniel Stenberg [Fri, 11 Nov 2016 13:53:36 +0000 (14:53 +0100)]
Curl_rand: fixed and moved to rand.c

Now Curl_rand() is made to fail if it cannot get the necessary random
level.

Changed the proto of Curl_rand() slightly to provide a number of ints at
once.

Moved out from vtls, since it isn't a TLS function and vtls provides
Curl_ssl_random() for this to use.

Discussion: https://curl.haxx.se/mail/lib-2016-11/0119.html

8 years agocmdline-opts: first test version of a new man page generator kit
Daniel Stenberg [Sun, 13 Nov 2016 22:40:12 +0000 (23:40 +0100)]
cmdline-opts: first test version of a new man page generator kit

See MANPAGE.md for the description of how this works. Each command line
option is now described in a separate .d file.

8 years agotime_t fix: follow-up to de4de4e3c7c
Daniel Stenberg [Sun, 13 Nov 2016 22:09:45 +0000 (23:09 +0100)]
time_t fix: follow-up to de4de4e3c7c

Blah, I accidentally wrote size_t instead of time_t for two variables.

Reported-by: Dave Reisner
8 years agotimeval: prefer time_t to hold seconds instead of long
Daniel Stenberg [Fri, 11 Nov 2016 09:19:22 +0000 (10:19 +0100)]
timeval: prefer time_t to hold seconds instead of long

... as long is still 32bit on modern 64bit windows machines, while
time_t is generally 64bit.

8 years agotests: fixed variable might be clobbered warning
Dan Fandrich [Sat, 12 Nov 2016 11:33:10 +0000 (12:33 +0100)]
tests: fixed variable might be clobbered warning

This stops the compiler from potentially making invalid assumptions
about the immutability of sdp and sap across the longjmp boundary.

8 years agoRELEASE-NOTES: synced with 346340808c
Daniel Stenberg [Fri, 11 Nov 2016 23:09:25 +0000 (00:09 +0100)]
RELEASE-NOTES: synced with 346340808c

8 years agoURL-parser: for file://[host]/ URLs, the [host] must be localhost
Daniel Stenberg [Fri, 11 Nov 2016 07:09:04 +0000 (08:09 +0100)]
URL-parser: for file://[host]/ URLs, the [host] must be localhost

Previously, the [host] part was just ignored which made libcurl accept
strange URLs misleading users. like "file://etc/passwd" which might've
looked like it refers to "/etc/passwd" but is just "/passwd" since the
"etc" is an ignored host name.

Reported-by: Mike Crowe
Assisted-by: Kamil Dudka
8 years agotest558: adapt to 0649433da
Daniel Stenberg [Fri, 11 Nov 2016 14:32:07 +0000 (15:32 +0100)]
test558: adapt to 0649433da

8 years agoopenssl: make sure to fail in the unlikely event that PRNG seeding fails
Daniel Stenberg [Fri, 11 Nov 2016 13:16:17 +0000 (14:16 +0100)]
openssl: make sure to fail in the unlikely event that PRNG seeding fails

8 years agoopenssl: avoid unnecessary seeding if already done
Daniel Stenberg [Fri, 11 Nov 2016 12:54:16 +0000 (13:54 +0100)]
openssl: avoid unnecessary seeding if already done

1.1.0+ does more of this by itself so we can avoid extra processing this
way.

8 years agoopenssl: RAND_status always exists in OpenSSL >= 0.9.7
Daniel Stenberg [Fri, 11 Nov 2016 12:37:01 +0000 (13:37 +0100)]
openssl: RAND_status always exists in OpenSSL >= 0.9.7

and remove RAND_screen from configure since nothing is using that
function

8 years agoCurl_pgrsUpdate: use dedicated function for time passed
Daniel Stenberg [Fri, 11 Nov 2016 10:02:02 +0000 (11:02 +0100)]
Curl_pgrsUpdate: use dedicated function for time passed

8 years agorealloc: use Curl_saferealloc to avoid common mistakes
Daniel Stenberg [Mon, 7 Nov 2016 09:55:25 +0000 (10:55 +0100)]
realloc: use Curl_saferealloc to avoid common mistakes

Discussed: https://curl.haxx.se/mail/lib-2016-11/0087.html

8 years agocurl: Add --retry-connrefused
Daniel Hwang [Sun, 9 Oct 2016 23:00:25 +0000 (16:00 -0700)]
curl: Add --retry-connrefused

to consider ECONNREFUSED as a transient error.

Closes #1064

8 years agoopenssl: raise the max_version to 1.3 if asked for
Daniel Stenberg [Thu, 10 Nov 2016 10:16:25 +0000 (11:16 +0100)]
openssl: raise the max_version to 1.3 if asked for

Now I've managed to negotiate TLS 1.3 with https://enabled.tls13.com/ when
using boringssl.

8 years agovtls: Fail on unrecognized param for CURLOPT_SSLVERSION
Jay Satiro [Tue, 8 Nov 2016 02:51:27 +0000 (21:51 -0500)]
vtls: Fail on unrecognized param for CURLOPT_SSLVERSION

- Fix GnuTLS code for CURL_SSLVERSION_TLSv1_2 that broke when the
TLS 1.3 support was added in 6ad3add.

- Homogenize across code for all backends the error message when TLS 1.3
is not available to "<backend>: TLS 1.3 is not yet supported".

- Return an error when a user-specified ssl version is unrecognized.

---

Prior to this change our code for some of the backends used the
'default' label in the switch statement (ie ver unrecognized) for
ssl.version and treated it the same as CURL_SSLVERSION_DEFAULT.

Bug: https://curl.haxx.se/mail/lib-2016-11/0048.html
Reported-by: Kamil Dudka
8 years agoSPNEGO: Fix memory leak when authentication fails
Isaac Boukris [Wed, 9 Nov 2016 13:37:34 +0000 (15:37 +0200)]
SPNEGO: Fix memory leak when authentication fails

If SPNEGO fails, cleanup the negotiate handle right away.

Fixes #1115

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reported-by: ashman-p
8 years agoCODE_STYLE.md: link to INTERNALS.md correctly
Daniel Stenberg [Wed, 9 Nov 2016 08:56:13 +0000 (09:56 +0100)]
CODE_STYLE.md: link to INTERNALS.md correctly

8 years agobump: next version will be 7.52.0
Daniel Stenberg [Wed, 9 Nov 2016 08:15:58 +0000 (09:15 +0100)]
bump: next version will be 7.52.0

8 years agoRELEASE-NOTES: synced with dfcdaaba371e9a3
Daniel Stenberg [Wed, 9 Nov 2016 08:14:44 +0000 (09:14 +0100)]
RELEASE-NOTES: synced with dfcdaaba371e9a3

8 years agoexamples/fileupload.c: fclose the file as well
Daniel Stenberg [Tue, 8 Nov 2016 22:00:43 +0000 (23:00 +0100)]
examples/fileupload.c: fclose the file as well

8 years agoprintf: fix ".*f" handling
Daniel Stenberg [Tue, 8 Nov 2016 14:30:33 +0000 (15:30 +0100)]
printf: fix ".*f" handling

It would always use precision 1 instead of reading it from the argument
list as intended.

Reported-by: Ray Satiro
Bug: #1113

8 years agocurl_formadd.3: *_FILECONTENT and *_FILE need the file to be kept
Daniel Stenberg [Tue, 8 Nov 2016 14:28:04 +0000 (15:28 +0100)]
curl_formadd.3: *_FILECONTENT and *_FILE need the file to be kept

Reported-by: Frank Gevaerts
8 years agonss: silence warning 'SSL_NEXT_PROTO_EARLY_VALUE not handled in switch'
Kamil Dudka [Mon, 7 Nov 2016 14:27:36 +0000 (15:27 +0100)]
nss: silence warning 'SSL_NEXT_PROTO_EARLY_VALUE not handled in switch'

... with nss-3.26.0 and newer

Reported-by: Daniel Stenberg
8 years agoopenssl: initial TLS 1.3 adaptions
Daniel Stenberg [Mon, 7 Nov 2016 13:38:59 +0000 (14:38 +0100)]
openssl: initial TLS 1.3 adaptions

BoringSSL supports TLSv1.3 already, but these changes don't seem to be anough
to get it working.

8 years agossh: check md5 fingerprints case insensitively (regression)
Daniel Stenberg [Mon, 7 Nov 2016 11:54:40 +0000 (12:54 +0100)]
ssh: check md5 fingerprints case insensitively (regression)

Revert the change from ce8d09483eea but use the new function

Reported-by: Kamil Dudka
Bug: https://github.com/curl/curl/commit/ce8d09483eea2fcb1b50e323e1a8ed1f3613b2e3#commitcomment-19666146

8 years agocurl: introduce the --tlsv1.3 option to force TLS 1.3
Kamil Dudka [Thu, 27 Oct 2016 12:58:43 +0000 (14:58 +0200)]
curl: introduce the --tlsv1.3 option to force TLS 1.3

Fully implemented with the NSS backend only for now.

Reviewed-by: Ray Satiro
8 years agovtls: support TLS 1.3 via CURL_SSLVERSION_TLSv1_3
Kamil Dudka [Thu, 27 Oct 2016 12:57:11 +0000 (14:57 +0200)]
vtls: support TLS 1.3 via CURL_SSLVERSION_TLSv1_3

Fully implemented with the NSS backend only for now.

Reviewed-by: Ray Satiro
8 years agonss: map CURL_SSLVERSION_DEFAULT to NSS default
Kamil Dudka [Thu, 27 Oct 2016 12:27:25 +0000 (14:27 +0200)]
nss: map CURL_SSLVERSION_DEFAULT to NSS default

... but make sure we use at least TLSv1.0 according to libcurl API

Reported-by: Cure53
Reviewed-by: Ray Satiro
8 years agos/cURL/curl
Daniel Stenberg [Mon, 7 Nov 2016 09:36:23 +0000 (10:36 +0100)]
s/cURL/curl

We're mostly saying just "curl" in lower case these days so here's a big
cleanup to adapt to this reality. A few instances are left as the
project could still formally be considered called cURL.

8 years agohttp2: Don't send header fields prohibited by HTTP/2 spec
Tatsuhiro Tsujikawa [Sun, 30 Oct 2016 10:04:03 +0000 (19:04 +0900)]
http2: Don't send header fields prohibited by HTTP/2 spec

Previously, we just ignored "Connection" header field.  But HTTP/2
specification actually prohibits few more header fields.  This commit
ignores all of them so that we don't send these bad header fields.

Bug: https://curl.haxx.se/mail/archive-2016-10/0033.html
Reported-by: Ricki Hirner
Closes https://github.com/curl/curl/pull/1092

8 years agocurl.1: explain the SMTP data expected for -T
Daniel Stenberg [Sun, 6 Nov 2016 15:02:16 +0000 (16:02 +0100)]
curl.1: explain the SMTP data expected for -T

Fixes #1107

Reported-by: Adam Piggott
8 years agocmake: disable poll for macOS
Peter Wu [Sun, 30 Oct 2016 23:45:17 +0000 (00:45 +0100)]
cmake: disable poll for macOS

Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce.

Fixes #1089

8 years agoeasy: Initialize info variables on easy init and duphandle
Jay Satiro [Sun, 6 Nov 2016 03:05:52 +0000 (23:05 -0400)]
easy: Initialize info variables on easy init and duphandle

- Call Curl_initinfo on init and duphandle.

Prior to this change the statistical and informational variables were
simply zeroed by calloc on easy init and duphandle. While zero is the
correct default value for almost all info variables, there is one where
it isn't (filetime initializes to -1).

Bug: https://github.com/curl/curl/issues/1103
Reported-by: Neal Poole
8 years agocurl -w: added more decimal digits to timing counters
Mauro Rappa [Fri, 4 Nov 2016 14:45:49 +0000 (14:45 +0000)]
curl -w: added more decimal digits to timing counters

Now showing microsecond resolution.

Closes #1106

8 years agodist: add CMakeLists.txt to the tarball
Jakub Zakrzewski [Fri, 4 Nov 2016 19:21:48 +0000 (20:21 +0100)]
dist: add CMakeLists.txt to the tarball

8 years agombedtls: fix build with mbedtls versions < 2.4.0
Daniel Stenberg [Fri, 4 Nov 2016 10:13:16 +0000 (11:13 +0100)]
mbedtls: fix build with mbedtls versions < 2.4.0

Regression added in 62a8095e714

Reported-by: Tony Kelman
Discussed in #1087

8 years agoconfigure: verify that compiler groks -Werror=partial-availability
Daniel Stenberg [Thu, 3 Nov 2016 22:37:59 +0000 (23:37 +0100)]
configure: verify that compiler groks -Werror=partial-availability

Reported-by: bemoody
Fixes #1104

8 years agodocs: shorten and simplify the top comment in multi-uv.c
Daniel Stenberg [Thu, 3 Nov 2016 11:44:38 +0000 (12:44 +0100)]
docs: shorten and simplify the top comment in multi-uv.c

and change URL to use https

8 years agodocs: handle CURL_POLL_INOUT in multi-uv example
Andrei Sedoi [Wed, 2 Nov 2016 10:46:54 +0000 (10:46 +0000)]
docs: handle CURL_POLL_INOUT in multi-uv example

8 years agodocs: multi-uv: don't use CURLMsg after cleanup
Andrei Sedoi [Wed, 2 Nov 2016 09:00:20 +0000 (09:00 +0000)]
docs: multi-uv: don't use CURLMsg after cleanup

8 years agodocs: remove unused variables in multi-uv example
Andrei Sedoi [Wed, 2 Nov 2016 08:48:32 +0000 (08:48 +0000)]
docs: remove unused variables in multi-uv example

8 years agobump: start working on 7.51.1
Daniel Stenberg [Thu, 3 Nov 2016 09:08:26 +0000 (10:08 +0100)]
bump: start working on 7.51.1

8 years agowinbuild: remove strcase.obj from curl build
Daniel Stenberg [Wed, 2 Nov 2016 13:45:24 +0000 (14:45 +0100)]
winbuild: remove strcase.obj from curl build

Reported-by: Bruce Stephens
Fixes #1098

8 years agomsvc: removed a straggling reference to strequal.c
Dan Fandrich [Wed, 2 Nov 2016 08:11:50 +0000 (09:11 +0100)]
msvc: removed a straggling reference to strequal.c

Follow-up to 502acba2

8 years agoTHANKS: synced with 7.51.0 curl-7_51_0
Daniel Stenberg [Tue, 1 Nov 2016 07:45:14 +0000 (08:45 +0100)]
THANKS: synced with 7.51.0

8 years agoRELEASE-NOTES: 7.51.0
Daniel Stenberg [Tue, 1 Nov 2016 07:43:14 +0000 (08:43 +0100)]
RELEASE-NOTES: 7.51.0

8 years agoftp_done: don't clobber the passed in error code
Daniel Stenberg [Wed, 2 Nov 2016 06:22:27 +0000 (07:22 +0100)]
ftp_done: don't clobber the passed in error code

Coverity CID 1374359 pointed out the unused result value.

8 years agoftp: remove dead code in ftp_done
Daniel Stenberg [Wed, 2 Nov 2016 06:18:24 +0000 (07:18 +0100)]
ftp: remove dead code in ftp_done

Coverity CID 1374358

8 years agogenerate.bat: Include include/curl in libcurl VS projects
Jay Satiro [Wed, 2 Nov 2016 01:31:10 +0000 (21:31 -0400)]
generate.bat: Include include/curl in libcurl VS projects

.. because including those headers helps Visual Studio's Intellisense.

8 years agogenerate.bat: Remove strcase.[ch] from curl tool VS projects
Jay Satiro [Wed, 2 Nov 2016 01:29:44 +0000 (21:29 -0400)]
generate.bat: Remove strcase.[ch] from curl tool VS projects

..because they're no longer needed in the tool build. strcase is still
built by the libcurl project and exports curl_str(n)equal which is used
by the curl tool.

Bug: https://github.com/curl/curl/commit/9363f1a#all_commit_comments

8 years agometalink: simplify the hex parsing function
Daniel Stenberg [Tue, 1 Nov 2016 23:08:36 +0000 (00:08 +0100)]
metalink: simplify the hex parsing function

... and now it avoids using the libcurl toupper() function

8 years agofile: fix compiler warning
Michael Kaufmann [Tue, 1 Nov 2016 19:39:13 +0000 (20:39 +0100)]
file: fix compiler warning

follow-up to 46133aa5

8 years agostrcase: fixed Metalink builds by redefining checkprefix()
Dan Fandrich [Tue, 1 Nov 2016 10:44:11 +0000 (11:44 +0100)]
strcase: fixed Metalink builds by redefining checkprefix()

...to use the public function curl_strnequal(). This isn't ideal because
it adds extra overhead to any internal calls to checkprefix.

follow-up to 95bd2b3e

8 years agocurl.1: typo
Daniel Stenberg [Tue, 1 Nov 2016 09:27:40 +0000 (10:27 +0100)]
curl.1: typo

8 years agocurl.1: expand on how multiple uses of -o looks
Daniel Stenberg [Tue, 1 Nov 2016 09:24:49 +0000 (10:24 +0100)]
curl.1: expand on how multiple uses of -o looks

Suggested-by: Dan Jacobson
Issue: https://github.com/curl/curl/issues/1097

8 years agotests/util: get a private strncasecompare clone
Daniel Stenberg [Mon, 31 Oct 2016 22:49:54 +0000 (23:49 +0100)]
tests/util: get a private strncasecompare clone

... since the curlx_* code no longer provides one and we don't link
libcurl to these test servers.

8 years agostrcase: make the tool use curl_str[n]equal instead
Daniel Stenberg [Mon, 31 Oct 2016 20:49:38 +0000 (21:49 +0100)]
strcase: make the tool use curl_str[n]equal instead

As they are after all part of the public API. Saves space and reduces
complexity. Remove the strcase defines from the curlx_ family.

Suggested-by: Dan Fandrich
Idea: https://curl.haxx.se/mail/lib-2016-10/0136.html

8 years agogskit, nss: do not include strequal.h
Kamil Dudka [Mon, 31 Oct 2016 16:33:46 +0000 (17:33 +0100)]
gskit, nss: do not include strequal.h

follow-up to 811a693b80

8 years agostrcasecompare: include curl.h in strcase.c
Dan Fandrich [Mon, 31 Oct 2016 14:17:35 +0000 (15:17 +0100)]
strcasecompare: include curl.h in strcase.c

This should fix the "warning: 'curl_strequal' redeclared without
dllimport attribute: previous dllimport ignored" message and subsequent
link error on Windows because of the missing CURL_EXTERN on the
prototype.

8 years agostrcase: fix the remaining rawstr users
Daniel Stenberg [Mon, 31 Oct 2016 14:19:26 +0000 (15:19 +0100)]
strcase: fix the remaining rawstr users

8 years agomsvc builds: s/rawstr/strcase
Daniel Stenberg [Mon, 31 Oct 2016 12:35:09 +0000 (13:35 +0100)]
msvc builds: s/rawstr/strcase

Follow-up to 811a693b

8 years agostrcasecompare: replaced remaining rawstr.h with strcase.h
Dan Fandrich [Mon, 31 Oct 2016 11:51:45 +0000 (12:51 +0100)]
strcasecompare: replaced remaining rawstr.h with strcase.h

This is a followup to commit 811a693b

8 years agodigest_sspi: fix include
Marcel Raad [Mon, 31 Oct 2016 11:48:48 +0000 (12:48 +0100)]
digest_sspi: fix include

Fix compile break from 811a693b80

8 years agolibauthretry: use the external function curl_strequal
Dan Fandrich [Mon, 31 Oct 2016 11:42:47 +0000 (12:42 +0100)]
libauthretry: use the external function curl_strequal

The internal version strcasecompare isn't available outside libcurl

8 years agoRELEASE-NOTES: synced with d14538d2501ef0da
Daniel Stenberg [Mon, 31 Oct 2016 09:50:32 +0000 (10:50 +0100)]
RELEASE-NOTES: synced with d14538d2501ef0da

8 years agoconfigure: raise the default minimum version for macos to 10.8
Daniel Stenberg [Mon, 31 Oct 2016 09:19:22 +0000 (10:19 +0100)]
configure: raise the default minimum version for macos to 10.8

follow-up to 4f8d0b6f02aa7043. Since the darwinssl code breaks
otherwise. If you build without darwinssl 10.5 works fine.

8 years agounit1301: keep testing curl_strequal
Daniel Stenberg [Mon, 31 Oct 2016 08:53:34 +0000 (09:53 +0100)]
unit1301: keep testing curl_strequal

as that is still part of the API, fix from 8fe4bd084412f30

8 years agoldap: fix include
Daniel Stenberg [Mon, 31 Oct 2016 08:50:41 +0000 (09:50 +0100)]
ldap: fix include

Fix bug from 811a693b80

8 years agourl: remove unconditional idn2.h include
Daniel Stenberg [Mon, 31 Oct 2016 08:49:50 +0000 (09:49 +0100)]
url: remove unconditional idn2.h include

Mistake brought by 9c91ec778104a

8 years agocurl_strequal: part of public API/ABI, needs to be kept
Daniel Stenberg [Mon, 31 Oct 2016 08:45:17 +0000 (09:45 +0100)]
curl_strequal: part of public API/ABI, needs to be kept

These two public functions have been mentioned as deprecated since a
very long time but since they are still part of the API and ABI we need
to keep them around.

8 years agostrcase: s/strequal/strcasecompare
Daniel Stenberg [Mon, 31 Oct 2016 08:37:30 +0000 (09:37 +0100)]
strcase: s/strequal/strcasecompare

some more follow-ups to 811a693b80

8 years agoldap: fix strcase use
Daniel Stenberg [Mon, 31 Oct 2016 08:30:36 +0000 (09:30 +0100)]
ldap: fix strcase use

follow-up to 811a693b80

8 years agotest165: adapted to the libidn2 use and IDNA2008 fix
Daniel Stenberg [Mon, 31 Oct 2016 07:35:08 +0000 (08:35 +0100)]
test165: adapted to the libidn2 use and IDNA2008 fix

8 years agocookie: replace use of fgets() with custom version
Daniel Stenberg [Tue, 27 Sep 2016 15:36:19 +0000 (17:36 +0200)]
cookie: replace use of fgets() with custom version

... that will ignore lines that are too long to fit in the buffer.

CVE-2016-8615

Bug: https://curl.haxx.se/docs/adv_20161102A.html
Reported-by: Cure53
8 years agostrcasecompare: all case insensitive string compares ignore locale now
Daniel Stenberg [Fri, 30 Sep 2016 16:54:02 +0000 (18:54 +0200)]
strcasecompare: all case insensitive string compares ignore locale now

We had some confusions on when each function was used. We should not act
differently on different locales anyway.

8 years agostrcasecompare: is the new name for strequal()
Daniel Stenberg [Fri, 30 Sep 2016 15:15:05 +0000 (17:15 +0200)]
strcasecompare: is the new name for strequal()

... to make it less likely that we forget that the function actually
does case insentive compares. Also replaced several invokes of the
function with a plain strcmp when case sensitivity is not an issue (like
comparing with "-").

8 years agoftp: check for previous patch must be case sensitive!
Daniel Stenberg [Fri, 30 Sep 2016 14:46:47 +0000 (16:46 +0200)]
ftp: check for previous patch must be case sensitive!

... otherwise example.com/PATH and example.com/path would be assumed to
be the same and they usually aren't!

8 years agoSSH: check md5 fingerprint case sensitively
Daniel Stenberg [Wed, 28 Sep 2016 08:20:35 +0000 (10:20 +0200)]
SSH: check md5 fingerprint case sensitively

8 years agoconnectionexists: use case sensitive user/password comparisons
Daniel Stenberg [Tue, 27 Sep 2016 16:01:53 +0000 (18:01 +0200)]
connectionexists: use case sensitive user/password comparisons

CVE-2016-8616

Bug: https://curl.haxx.se/docs/adv_20161102B.html
Reported-by: Cure53
8 years agobase64: check for integer overflow on large input
Daniel Stenberg [Tue, 27 Sep 2016 22:05:12 +0000 (00:05 +0200)]
base64: check for integer overflow on large input

CVE-2016-8617

Bug: https://curl.haxx.se/docs/adv_20161102C.html
Reported-by: Cure53
8 years agokrb5: avoid realloc(0)
Daniel Stenberg [Wed, 28 Sep 2016 10:56:02 +0000 (12:56 +0200)]
krb5: avoid realloc(0)

If the requested size is zero, bail out with error instead of doing a
realloc() that would cause a double-free: realloc(0) acts as a free()
and then there's a second free in the cleanup path.

CVE-2016-8619

Bug: https://curl.haxx.se/docs/adv_20161102E.html
Reported-by: Cure53
8 years agoaprintf: detect wrap-around when growing allocation
Daniel Stenberg [Wed, 28 Sep 2016 08:15:34 +0000 (10:15 +0200)]
aprintf: detect wrap-around when growing allocation

On 32bit systems we could otherwise wrap around after 2GB and allocate 0
bytes and crash.

CVE-2016-8618

Bug: https://curl.haxx.se/docs/adv_20161102D.html
Reported-by: Cure53
8 years agorange: reject char globs with missing end like '[L-]'
Daniel Stenberg [Tue, 4 Oct 2016 15:25:09 +0000 (17:25 +0200)]
range: reject char globs with missing end like '[L-]'

... which previously would lead to out of boundary reads.

Reported-by: Luật Nguyễn
8 years agoglob_next_url: make sure to stay within the given output buffer
Daniel Stenberg [Mon, 3 Oct 2016 16:23:22 +0000 (18:23 +0200)]
glob_next_url: make sure to stay within the given output buffer

8 years agorange: prevent negative end number in a glob range
Daniel Stenberg [Mon, 3 Oct 2016 15:27:16 +0000 (17:27 +0200)]
range: prevent negative end number in a glob range

CVE-2016-8620

Bug: https://curl.haxx.se/docs/adv_20161102F.html
Reported-by: Luật Nguyễn
8 years agoparsedate: handle cut off numbers better
Daniel Stenberg [Tue, 4 Oct 2016 14:59:38 +0000 (16:59 +0200)]
parsedate: handle cut off numbers better

... and don't read outside of the given buffer!

CVE-2016-8621

bug: https://curl.haxx.se/docs/adv_20161102G.html
Reported-by: Luật Nguyễn
8 years agoescape: avoid using curl_easy_unescape() internally
Daniel Stenberg [Sat, 8 Oct 2016 09:21:38 +0000 (11:21 +0200)]
escape: avoid using curl_easy_unescape() internally

Since the internal Curl_urldecode() function has a better API.

8 years agounescape: avoid integer overflow
Daniel Stenberg [Tue, 4 Oct 2016 16:56:45 +0000 (18:56 +0200)]
unescape: avoid integer overflow

CVE-2016-8622

Bug: https://curl.haxx.se/docs/adv_20161102H.html
Reported-by: Cure53
8 years agocookies: getlist() now holds deep copies of all cookies
Daniel Stenberg [Tue, 4 Oct 2016 21:26:13 +0000 (23:26 +0200)]
cookies: getlist() now holds deep copies of all cookies

Previously it only held references to them, which was reckless as the
thread lock was released so the cookies could get modified by other
handles that share the same cookie jar over the share interface.

CVE-2016-8623

Bug: https://curl.haxx.se/docs/adv_20161102I.html
Reported-by: Cure53
8 years agoTODO: remove IDNA2008
Daniel Stenberg [Mon, 24 Oct 2016 12:26:38 +0000 (14:26 +0200)]
TODO: remove IDNA2008

8 years agoidn: switch to libidn2 use and IDNA2008 support
Daniel Stenberg [Wed, 12 Oct 2016 07:01:06 +0000 (09:01 +0200)]
idn: switch to libidn2 use and IDNA2008 support

CVE-2016-8625

Bug: https://curl.haxx.se/docs/adv_20161102K.html
Reported-by: Christian Heimes
8 years agotest1246: verify URL parsing with host name ending with '#'
Daniel Stenberg [Mon, 10 Oct 2016 22:54:51 +0000 (00:54 +0200)]
test1246: verify URL parsing with host name ending with '#'

8 years agourlparse: accept '#' as end of host name
Daniel Stenberg [Mon, 10 Oct 2016 22:48:35 +0000 (00:48 +0200)]
urlparse: accept '#' as end of host name

'http://example.com#@127.0.0.1/x.txt' equals a request to example.com
for the '/' document with the rest of the URL being a fragment.

CVE-2016-8624

Bug: https://curl.haxx.se/docs/adv_20161102J.html
Reported-by: Fernando Muñoz
8 years agoINTERNALS: better markdown (follow-up)
Jay Satiro [Mon, 31 Oct 2016 04:38:27 +0000 (00:38 -0400)]
INTERNALS: better markdown (follow-up)

- Wrap more words with underscores in backticks.

Follow-up to 13f4913.

8 years agoINTERNALS: better markdown
Daniel Stenberg [Sun, 30 Oct 2016 22:45:25 +0000 (23:45 +0100)]
INTERNALS: better markdown

words with underscore need to be within `these`

Bug: https://github.com/curl/curl-www/issues/19
Reported-by : Jay Satiro

8 years agomk-ca-bundle.vbs: Fix UTF-8 output
Jay Satiro [Sun, 30 Oct 2016 05:01:29 +0000 (01:01 -0400)]
mk-ca-bundle.vbs: Fix UTF-8 output

- Change initial message box to mention delay when downloading/parsing.

Since there is no progress meter it was somewhat unexpected that after
choosing a filename nothing appears to happen, when actually the cert
data is in the process of being downloaded and parsed.

- Warn if OpenSSL is not present.

- Use a UTF-8 stream to make the ca-bundle data.

- Save the UTF-8 ca-bundle stream as binary so that no BOM is added.

---

This is a follow-up to d2c6d15 which switched mk-ca-bundle.vbs output to
ANSI due to corrupt UTF-8 output, now fixed.

This change completes making the default certificate bundle output of
mk-ca-bundle.vbs as close as possible to that of mk-ca-bundle.pl, which
should make it easier to review any difference between their output.

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

8 years agoBINDINGS: converted to markdown
Daniel Stenberg [Fri, 28 Oct 2016 07:46:49 +0000 (09:46 +0200)]
BINDINGS: converted to markdown

To make it render better on the web site, at the price of it becoming
slightly less readable as text.

8 years agoCURLMOPT_MAX_PIPELINE_LENGTH.3: Clarify it's not for HTTP/2
Jay Satiro [Fri, 28 Oct 2016 03:15:12 +0000 (23:15 -0400)]
CURLMOPT_MAX_PIPELINE_LENGTH.3: Clarify it's not for HTTP/2

- Clarify that this option is only for HTTP/1.1 pipelining.

Bug: https://github.com/curl/curl/issues/1059
Reported-by: Jeroen Ooms
Assisted-by: Daniel Stenberg