From: Daniel Stenberg Date: Fri, 17 Oct 2003 09:26:28 +0000 (+0000) Subject: made the code deal with empty name and password X-Git-Tag: curl-7_10_8~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e3f54431d8fd1873a05f5b99de5296b285a77b8;p=thirdparty%2Fcurl.git made the code deal with empty name and password --- diff --git a/lib/ftp.c b/lib/ftp.c index 41ef3089f1..6ee81b5d20 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -483,7 +483,7 @@ CURLcode Curl_ftp_connect(struct connectdata *conn) #endif /* send USER */ - FTPSENDF(conn, "USER %s", ftp->user); + FTPSENDF(conn, "USER %s", ftp->user?ftp->user:""); /* wait for feedback */ result = Curl_GetFTPResponse(&nread, conn, &ftpcode); @@ -499,7 +499,7 @@ CURLcode Curl_ftp_connect(struct connectdata *conn) else if(ftpcode == 331) { /* 331 Password required for ... (the server requires to send the user's password too) */ - FTPSENDF(conn, "PASS %s", ftp->passwd); + FTPSENDF(conn, "PASS %s", ftp->passwd?ftp->passwd:""); result = Curl_GetFTPResponse(&nread, conn, &ftpcode); if(result) return result;