aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/ftp.c
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-04-10 23:38:39 +0300
committershadchin <shadchin@yandex-team.ru>2022-04-10 23:38:39 +0300
commitd0d27ff451c16dbec7fbc99206cba32803c52cc6 (patch)
tree9ab7a06c0bb58e38fe848af1bb8623f468900ba6 /contrib/libs/curl/lib/ftp.c
parent37591f1db8ea08ea964badf4ff15f8a923271524 (diff)
downloadydb-d0d27ff451c16dbec7fbc99206cba32803c52cc6.tar.gz
CONTRIB-2513 Update contrib/libs/curl to 7.79.1
ref:cfccba5015904b0f0cadfc018200e2a1b4d50ae6
Diffstat (limited to 'contrib/libs/curl/lib/ftp.c')
-rw-r--r--contrib/libs/curl/lib/ftp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/libs/curl/lib/ftp.c b/contrib/libs/curl/lib/ftp.c
index 1a699de594..0b9c9b7322 100644
--- a/contrib/libs/curl/lib/ftp.c
+++ b/contrib/libs/curl/lib/ftp.c
@@ -2681,9 +2681,12 @@ static CURLcode ftp_statemachine(struct Curl_easy *data,
/* we have now received a full FTP server response */
switch(ftpc->state) {
case FTP_WAIT220:
- if(ftpcode == 230)
- /* 230 User logged in - already! */
- return ftp_state_user_resp(data, ftpcode, ftpc->state);
+ if(ftpcode == 230) {
+ /* 230 User logged in - already! Take as 220 if TLS required. */
+ if(data->set.use_ssl <= CURLUSESSL_TRY ||
+ conn->bits.ftp_use_control_ssl)
+ return ftp_state_user_resp(data, ftpcode, ftpc->state);
+ }
else if(ftpcode != 220) {
failf(data, "Got a %03d ftp-server response when 220 was expected",
ftpcode);
@@ -2740,6 +2743,9 @@ static CURLcode ftp_statemachine(struct Curl_easy *data,
case FTP_AUTH:
/* we have gotten the response to a previous AUTH command */
+ if(pp->cache_size)
+ return CURLE_WEIRD_SERVER_REPLY; /* Forbid pipelining in response. */
+
/* RFC2228 (page 5) says:
*
* If the server is willing to accept the named security mechanism,