summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* singlesocket: use separate variable for inner loopDaniel Stenberg2019-06-011-4/+4
| | | | | | | | | | An inner loop within the singlesocket() function wrongly re-used the variable for the outer loop which then could cause an infinite loop. Change to using a separate variable! Reported-by: Eric Wu Fixes #3970 Closes #3973
* http2: Stop drain from being permanently set onJosie Huddleston2019-05-301-3/+4
| | | | | | | | | | | | | | | | | | Various functions called within Curl_http2_done() can have the side-effect of setting the Easy connection into drain mode (by calling drain_this()). However, the last time we unset this for a transfer (by calling drained_transfer()) is at the beginning of Curl_http2_done(). If the Curl_easy is reused for another transfer, it is then stuck in drain mode permanently, which in practice makes it unable to write any data in the new transfer. This fix moves the last call to drained_transfer() to later in Curl_http2_done(), after the functions that could potentially call for a drain. Fixes #3966 Closes #3967 Reported-by: Josie-H
* conncache: Remove the DEBUGASSERT on length checkSteve Holme2019-05-291-4/+4
| | | | | | We trust the calling code as this is an internal function. Closes #3962
* system_win32: fix function prototypeGisle Vanem2019-05-291-1/+1
| | | | | | | | - Change if_nametoindex parameter type from char * to const char *. Follow-up to 09eef8af from this morning. Bug: https://github.com/curl/curl/commit/09eef8af#r33716067
* url: Load if_nametoindex() dynamically from iphlpapi.dll on WindowsSteve Holme2019-05-294-30/+44
| | | | | | | | | | This fixes the static dependency on iphlpapi.lib and allows curl to build for targets prior to Windows Vista. This partially reverts 170bd047. Fixes #3960 Closes #3958
* http: fix "error: equality comparison with extraneous parentheses"Daniel Stenberg2019-05-291-1/+1
|
* parse_proxy: make sure portptr is initializedDaniel Stenberg2019-05-281-1/+1
| | | | | | Reported-by: Benbuck Nason fixes #3959
* url: default conn->port to the same as conn->remote_portDaniel Stenberg2019-05-282-3/+6
| | | | | | | | | | | | | | ... so that it has a sensible value when ConnectionExists() is called which needs it set to differentiate host "bundles" correctly on port number! Also, make conncache:hashkey() use correct port for bundles that are proxy vs host connections. Probably a regression from 7.62.0 Reported-by: Tom van der Woerdt Fixes #3956 Closes #3957
* conncache: make "bundles" per host name when doing proxy tunnelsDaniel Stenberg2019-05-283-17/+23
| | | | | | | | | Only HTTP proxy use where multiple host names can be used over the same connection should use the proxy host name for bundles. Reported-by: Tom van der Woerdt Fixes #3951 Closes #3955
* multi: track users of a socket betterDaniel Stenberg2019-05-282-12/+27
| | | | | | | | | | | | | | They need to be removed from the socket hash linked list with more care. When sh_delentry() is called to remove a sockethash entry, remove all individual transfers from the list first. To enable this, each Curl_easy struct now stores a pointer to the sockethash entry to know how to remove itself. Reported-by: Tom van der Woerdt and Kunal Ekawde Fixes #3952 Fixes #3904 Closes #3953
* curl-win32.h: Enable Unix Domain Sockets based on the Windows SDK versionSteve Holme2019-05-281-2/+6
| | | | | | | | | | Microsoft added support for Unix Domain Sockets in Windows 10 1803 (RS4). Rather than expect the user to enable Unix Domain Sockets by uncommenting the #define that was added in 0fd6221f we use the RS4 pre-processor variable that is present in newer versions of the Windows SDK. Closes #3939
* cmake: support CMAKE_OSX_ARCHITECTURES when detecting SIZEOF variablesJonas Vautherin2019-05-281-7/+16
| | | | Closes #3945
* nss: allow to specify TLS 1.3 ciphers if supported by NSSHubert Kario2019-05-271-0/+5
| | | | Closes #3916
* Revert all SASL authzid (new feature) commitsJay Satiro2019-05-254-24/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Revert all commits related to the SASL authzid feature since the next release will be a patch release, 7.65.1. Prior to this change CURLOPT_SASL_AUTHZID / --sasl-authzid was destined for the next release, assuming it would be a feature release 7.66.0. However instead the next release will be a patch release, 7.65.1 and will not contain any new features. After the patch release after the reverted commits can be restored by using cherry-pick: git cherry-pick a14d72c a9499ff 8c1cc36 c2a8d52 0edf690 Details for all reverted commits: Revert "os400: take care of CURLOPT_SASL_AUTHZID in curl_easy_setopt_ccsid()." This reverts commit 0edf6907ae37e2020722e6f61229d8ec64095b0a. Revert "tests: Fix the line endings for the SASL alt-auth tests" This reverts commit c2a8d52a1356a722ff9f4aeb983cd4eaf80ef221. Revert "examples: Added SASL PLAIN authorisation identity (authzid) examples" This reverts commit 8c1cc369d0c7163c6dcc91fd38edfea1f509ae75. Revert "curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the tool" This reverts commit a9499ff136d89987af885e2d7dff0a066a3e5817. Revert "sasl: Implement SASL authorisation identity via CURLOPT_SASL_AUTHZID" This reverts commit a14d72ca2fec5d4eb5a043936e4f7ce08015c177.
* sectransp: handle errSSLPeerAuthCompleted from SSLRead()Daniel Stenberg2019-05-241-7/+20
| | | | | | Reported-by: smuellerDD on github Fixes #3932 Closes #3933
* Fix typo.Gisle Vanem2019-05-241-1/+1
|
* md4: include the mbedtls config.h to get the MD4 infoDaniel Stenberg2019-05-231-0/+3
|
* md4: build correctly with openssl without MD4Daniel Stenberg2019-05-231-0/+4
| | | | | | Reported-by: elsamuko at github Fixes #3921 Closes #3922
* config-win32: add support for if_nametoindex and getsocknameZenju2019-05-232-3/+19
| | | | Closes https://github.com/curl/curl/pull/3923
* url: fix bad #ifdefDaniel Stenberg2019-05-231-1/+1
| | | | | | | | Regression since e91e48161235272ff485. Reported-by: Tom Greenslade Fixes #3924 Closes #3925
* Revert "progress: CURL_DISABLE_PROGRESS_METER"Daniel Stenberg2019-05-231-61/+49
| | | | | | | | | | | | This reverts commit 3b06e68b7734cb10a555f9d7e804dd5d808236a4. Clearly this change wasn't good enough as it broke CURLOPT_LOW_SPEED_LIMIT + CURLOPT_LOW_SPEED_TIME Reported-by: Dave Reisner Fixes #3927 Closes #3928
* sasl: Implement SASL authorisation identity via CURLOPT_SASL_AUTHZIDSteve Holme2019-05-224-5/+24
| | | | | | | | | | Added the ability for the calling program to specify the authorisation identity (authzid), the identity to act as, in addition to the authentication identity (authcid) and password when using SASL PLAIN authentication. Fixed #3653 Closes #3790
* PolarSSL: deprecate support step 1. Removed from configure.Daniel Stenberg2019-05-223-7/+5
| | | | | | | | Also removed mentions from most docs. Discussed: https://curl.haxx.se/mail/lib-2019-05/0045.html Closes #3888
* configure/cmake: check for if_nametoindex()Daniel Stenberg2019-05-221-0/+3
| | | | | | | | - adds the check to cmake - fixes the configure check to work for cross-compiled windows builds Closes #3917
* parse_proxy: use the IPv6 zone id if givenDaniel Stenberg2019-05-221-25/+36
| | | | | | | | | | If the proxy string is given as an IPv6 numerical address with a zone id, make sure to use that for the connect to the proxy. Reported-by: Edmond Yu Fixes #3482 Closes #3918
* url: convert the zone id from a IPv6 URL to correct scope idDaniel Stenberg2019-05-211-43/+22
| | | | | | Reported-by: GitYuanQu on github Fixes #3902 Closes #3914
* udpateconninfo: mark variable unusedDaniel Gustafsson2019-05-211-0/+2
| | | | | | | | | | 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
* ftp: move ftp_ccc in under featureflagDaniel Gustafsson2019-05-214-0/+8
| | | | | | | | | | 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
* mbedtls: enable use of EC keysGuy Poizat2019-05-201-1/+2
| | | | Closes #3892
* urlapi: increase supported scheme length to 40 bytesOmar Ramadan2019-05-202-6/+8
| | | | | | | The longest currently registered URI scheme at IANA is 36 bytes long. Closes #3905 Closes #3900
* lib: reduce variable scopesMarcel Raad2019-05-2023-124/+115
| | | | | | Fixes Codacy/CppCheck warnings. Closes https://github.com/curl/curl/pull/3872
* ssh: move variable declaration to where it's usedMarcel Raad2019-05-201-8/+5
| | | | | | This way, we need only one call to free. Closes https://github.com/curl/curl/pull/3873
* ssh-libssh: remove unused variableMarcel Raad2019-05-201-3/+1
| | | | | | sock was only used to be assigned to fd_read. Closes https://github.com/curl/curl/pull/3873
* tftp: use the current blksize for recvfrom()Daniel Stenberg2019-05-201-1/+1
| | | | | | bug: https://curl.haxx.se/docs/CVE-2019-5436.html Reported-by: l00p3r on hackerone CVE-2019-5436
* version: make ssl_version buffer match for multi_sslDaniel Gustafsson2019-05-191-0/+4
| | | | | | | | | | | | 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>
* http_ntlm_wb: Handle auth for only a single requestSteve Holme2019-05-181-3/+11
| | | | | | | | | | | | | | 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.
* http_ntlm_wb: Cleanup handshake after clean NTLM failureSteve Holme2019-05-181-1/+7
| | | | Missed in 50b87c4e.
* http_ntlm_wb: Return the correct error on receiving an empty auth messageSteve Holme2019-05-181-3/+11
| | | | | | Missed in fe20826b as it wasn't implemented in http.c in b4d6db83. Closes #3894
* libcurl: #ifdef away more code for disabled features/protocolsDaniel Stenberg2019-05-176-104/+153
|
* progress: CURL_DISABLE_PROGRESS_METERDaniel Stenberg2019-05-171-49/+61
|
* hostip: CURL_DISABLE_SHUFFLE_DNSDaniel Stenberg2019-05-172-1/+6
|
* netrc: CURL_DISABLE_NETRCDaniel Stenberg2019-05-172-2/+12
|
* cleanup: remove FIXME and TODO commentsDaniel Stenberg2019-05-1627-114/+24
| | | | | | | | | 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
* http_ntlm_wb: Move the type-2 message processing into a dedicated functionSteve Holme2019-05-163-15/+35
| | | | | | This brings the code inline with the other HTTP authentication mechanisms. Closes #3890
* parse_proxy: use the URL parser APIDaniel Stenberg2019-05-151-147/+82
| | | | | | | 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
* http_negotiate: Move the Negotiate state out of the negotiatedata structureSteve Holme2019-05-156-30/+37
| | | | | | | Given that this member variable is not used by the SASL based protocols there is no need to have it here. Closes #3882
* http_ntlm: Move the NTLM state out of the ntlmdata structureSteve Holme2019-05-156-28/+34
| | | | | Given that this member variable is not used by the SASL based protocols there is no need to have it here.
* url: Move the negotiate state type into a dedicated enumSteve Holme2019-05-151-3/+9
|
* url: Remove duplicate clean up of the winbind variables in conn_shutdown()Steve Holme2019-05-141-6/+0
| | | | | | | | 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
* urlapi: require a non-zero host name length when parsing URLDaniel Stenberg2019-05-141-0/+2
| | | | | | Updated test 1560 to verify. Closes #3880