diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-10-17 09:26:28 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-10-17 09:26:28 +0000 |
commit | 9e3f54431d8fd1873a05f5b99de5296b285a77b8 (patch) | |
tree | 8eabe9a855a66e6613b20393a3e70cac00526e09 | |
parent | 3d59934163a3a3bd325ca41d2b419b3f642ce243 (diff) |
made the code deal with empty name and password
-rw-r--r-- | lib/ftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |