aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-05-21url: convert the zone id from a IPv6 URL to correct scope idDaniel Stenberg
Reported-by: GitYuanQu on github Fixes #3902 Closes #3914
2019-05-21udpateconninfo: mark variable unusedDaniel Gustafsson
When compiling without getpeername() or getsockname(), the sockfd paramter to Curl_udpateconninfo() became unused after commit e91e481612 added ifdef guards. Closes #3910 Fixes https://curl.haxx.se/dev/log.cgi?id=20190520172441-32196 Reviewed-by: Marcel Raad, Daniel Stenberg
2019-05-21ftp: move ftp_ccc in under featureflagDaniel Gustafsson
Commit e91e48161235272ff485ff32bd048c53af731f43 moved ftp_ccc in under the FTP featureflag in the UserDefined struct, but vtls callsites were still using it unprotected. Closes #3912 Fixes: https://curl.haxx.se/dev/log.cgi?id=20190520044705-29865 Reviewed-by: Daniel Stenberg, Marcel Raad
2019-05-20mbedtls: enable use of EC keysGuy Poizat
Closes #3892
2019-05-20urlapi: increase supported scheme length to 40 bytesOmar Ramadan
The longest currently registered URI scheme at IANA is 36 bytes long. Closes #3905 Closes #3900
2019-05-20lib: reduce variable scopesMarcel Raad
Fixes Codacy/CppCheck warnings. Closes https://github.com/curl/curl/pull/3872
2019-05-20ssh: move variable declaration to where it's usedMarcel Raad
This way, we need only one call to free. Closes https://github.com/curl/curl/pull/3873
2019-05-20ssh-libssh: remove unused variableMarcel Raad
sock was only used to be assigned to fd_read. Closes https://github.com/curl/curl/pull/3873
2019-05-20tftp: use the current blksize for recvfrom()Daniel Stenberg
bug: https://curl.haxx.se/docs/CVE-2019-5436.html Reported-by: l00p3r on hackerone CVE-2019-5436
2019-05-19version: make ssl_version buffer match for multi_sslDaniel Gustafsson
When running a multi TLS backend build the version string needs more buffer space. Make the internal ssl_buffer stack buffer match the one in Curl_multissl_version() to allow for the longer string. For single TLS backend builds there is no use in extended to buffer. This is a fallout from #3863 which fixes up the multi_ssl string generation to avoid a buffer overflow when the buffer is too small. Closes #3875 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2019-05-18http_ntlm_wb: Handle auth for only a single requestSteve Holme
Currently when the server responds with 401 on NTLM authenticated connection (re-used) we consider it to have failed. However this is legitimate and may happen when for example IIS is set configured to 'authPersistSingleRequest' or when the request goes thru a proxy (with 'via' header). Implemented by imploying an additional state once a connection is re-used to indicate that if we receive 401 we need to restart authentication. Missed in fe6049f0.
2019-05-18http_ntlm_wb: Cleanup handshake after clean NTLM failureSteve Holme
Missed in 50b87c4e.
2019-05-18http_ntlm_wb: Return the correct error on receiving an empty auth messageSteve Holme
Missed in fe20826b as it wasn't implemented in http.c in b4d6db83. Closes #3894
2019-05-17libcurl: #ifdef away more code for disabled features/protocolsDaniel Stenberg
2019-05-17progress: CURL_DISABLE_PROGRESS_METERDaniel Stenberg
2019-05-17hostip: CURL_DISABLE_SHUFFLE_DNSDaniel Stenberg
2019-05-17netrc: CURL_DISABLE_NETRCDaniel Stenberg
2019-05-16cleanup: remove FIXME and TODO commentsDaniel Stenberg
They serve very little purpose and mostly just add noise. Most of them have been around for a very long time. I read them all before removing or rephrasing them. Ref: #3876 Closes #3883
2019-05-16http_ntlm_wb: Move the type-2 message processing into a dedicated functionSteve Holme
This brings the code inline with the other HTTP authentication mechanisms. Closes #3890
2019-05-15parse_proxy: use the URL parser APIDaniel Stenberg
As we treat a given proxy as a URL we should use the unified URL parser to extract the parts out of it. Closes #3878
2019-05-15http_negotiate: Move the Negotiate state out of the negotiatedata structureSteve Holme
Given that this member variable is not used by the SASL based protocols there is no need to have it here. Closes #3882
2019-05-15http_ntlm: Move the NTLM state out of the ntlmdata structureSteve Holme
Given that this member variable is not used by the SASL based protocols there is no need to have it here.
2019-05-15url: Move the negotiate state type into a dedicated enumSteve Holme
2019-05-14url: Remove duplicate clean up of the winbind variables in conn_shutdown()Steve Holme
Given that Curl_disconnect() calls Curl_http_auth_cleanup_ntlm() prior to calling conn_shutdown() and it in turn performs this, there is no need to perform the same action in conn_shutdown(). Closes #3881
2019-05-14urlapi: require a non-zero host name length when parsing URLDaniel Stenberg
Updated test 1560 to verify. Closes #3880
2019-05-14imap: Fix typo in commentDaniel Gustafsson
2019-05-14url: Remove unnecessary initialisation from allocate_conn()Steve Holme
No need to set variables to zero as calloc() does this for us. Closes #3879
2019-05-13vtls: fix potential ssl_buffer stack overflowDaniel Gustafsson
In Curl_multissl_version() it was possible to overflow the passed in buffer if the generated version string exceeded the size of the buffer. Fix by inverting the logic, and also make sure to not exceed the local buffer during the string generation. Closes #3863 Reported-by: nevv on HackerOne/curl Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg
2019-05-13pingpong: disable more when no pingpong enabledDaniel Stenberg
2019-05-13proxy: acknowledge DISABLE_PROXY moreDaniel Stenberg
2019-05-13parsedate: CURL_DISABLE_PARSEDATEDaniel Stenberg
2019-05-13sasl: only enable if there's a protocol enabled using itDaniel Stenberg
2019-05-13mime: acknowledge CURL_DISABLE_MIMEDaniel Stenberg
2019-05-13wildcard: disable from build when FTP isn't presentDaniel Stenberg
2019-05-13http: CURL_DISABLE_HTTP_AUTHDaniel Stenberg
2019-05-13base64: build conditionally if there are usersDaniel Stenberg
2019-05-13doh: CURL_DISABLE_DOHDaniel Stenberg
2019-05-12auth: Rename the various authentication clean up functionsSteve Holme
For consistency and to a avoid confusion. Closes #3869
2019-05-12easy: fix another "clarify calculation precedence" warningMarcel Raad
I missed this one in commit 6b3dde7fe62ea5a557fd1fd323fac2bcd0c2e9be.
2019-05-12build: fix "clarify calculation precedence" warningsMarcel Raad
Codacy/CppCheck warns about this. Consistently use parentheses as we already do in some places to silence the warning. Closes https://github.com/curl/curl/pull/3866
2019-05-11http_ntlm: Corrected the name of the include guardSteve Holme
Missed in f0bdd72c. Closes #3867
2019-05-11http_digest: Don't expose functions when HTTP and Crypto Auth are disabledSteve Holme
Closes #3861
2019-05-11http_negotiate: Don't expose functions when HTTP is disabledSteve Holme
2019-05-11doh: disable DOH for the cases it doesn't workDaniel Stenberg
Due to limitations in Curl_resolver_wait_resolv(), it doesn't work for DOH resolves. This fix disables DOH for those. Limitation added to KNOWN_BUGS. Fixes #3850 Closes #3857
2019-05-10vauth: Fix incorrect function description for Curl_auth_user_contains_domain()Steve Holme
...and misalignment of these comments. From a78c61a4. Closes #3860
2019-05-10Revert "multi: support verbose conncache closure handle"Jay Satiro
This reverts commit b0972bc. - No longer show verbose output for the conncache closure handle. The offending commit was added so that the conncache closure handle would inherit verbose mode from the user's easy handle. (Note there is no way for the user to set options for the closure handle which is why that was necessary.) Other debug settings such as the debug function were not also inherited since we determined that could lead to crashes if the user's per-handle private data was used on an unexpected handle. The reporter here says he has a debug function to capture the verbose output, and does not expect or want any output to stderr; however because the conncache closure handle does not inherit the debug function the verbose output for that handle does go to stderr. There are other plausible scenarios as well such as the user redirects stderr on their handle, which is also not inherited since it could lead to crashes when used on an unexpected handle. Short of allowing the user to set options for the conncache closure handle I don't think there's much we can safely do except no longer inherit the verbose setting. Bug: https://curl.haxx.se/mail/lib-2019-05/0021.html Reported-by: Kristoffer Gleditsch Ref: https://github.com/curl/curl/pull/3598 Ref: https://github.com/curl/curl/pull/3618 Closes https://github.com/curl/curl/pull/3856
2019-05-10ntlm: Fix misaligned function comments for Curl_auth_ntlm_cleanup()Steve Holme
From 6012fa5a. Closes #3858
2019-05-09http_negotiate: do not treat failure of gss_init_sec_context() as fatalKamil Dudka
Fixes #3726 Closes #3849
2019-05-09spnego_gssapi: fix return code on gss_init_sec_context() failureKamil Dudka
Fixes #3726 Closes #3849
2019-05-08http: Ignore HTTP/2 prior knowledge setting for HTTP proxiesJay Satiro
- Do not switch to HTTP/2 for an HTTP proxy that is not tunnelling to the destination host. We already do something similar for HTTPS proxies by not sending h2. [1] Prior to this change setting CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE would incorrectly use HTTP/2 to talk to the proxy, which is not something we support (yet?). Also it's debatable whether or not that setting should apply to HTTP/2 proxies. [1]: https://github.com/curl/curl/commit/17c5d05 Bug: https://github.com/curl/curl/issues/3570 Bug: https://github.com/curl/curl/issues/3832 Closes https://github.com/curl/curl/pull/3853