Loading lib/ftp.c +3 −2 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ const struct Curl_handler Curl_handler_ftp = { ZERO_NULL, /* readwrite */ PORT_FTP, /* defport */ CURLPROTO_FTP, /* protocol */ PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */ PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */ }; Loading @@ -206,7 +206,8 @@ const struct Curl_handler Curl_handler_ftps = { ZERO_NULL, /* readwrite */ PORT_FTPS, /* defport */ CURLPROTO_FTP | CURLPROTO_FTPS, /* protocol */ PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */ PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */ }; #endif Loading lib/imap.c +2 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ const struct Curl_handler Curl_handler_imap = { ZERO_NULL, /* readwrite */ PORT_IMAP, /* defport */ CURLPROTO_IMAP, /* protocol */ PROTOPT_CLOSEACTION /* flags */ PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */ }; Loading @@ -154,7 +154,7 @@ const struct Curl_handler Curl_handler_imaps = { ZERO_NULL, /* readwrite */ PORT_IMAPS, /* defport */ CURLPROTO_IMAP | CURLPROTO_IMAPS, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */ PROTOPT_CLOSEACTION | PROTOPT_SSL | PROTOPT_NEEDSPWD /* flags */ }; #endif Loading lib/url.c +1 −1 Original line number Diff line number Diff line Loading @@ -4452,7 +4452,7 @@ static CURLcode set_userpass(struct connectdata *conn, const char *user, const char *passwd) { /* If our protocol needs a password and we have none, use the defaults */ if((conn->handler->protocol & (CURLPROTO_FTP|CURLPROTO_IMAP)) && if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_passwd) { conn->user = strdup(CURL_DEFAULT_USER); Loading lib/urldata.h +3 −1 Original line number Diff line number Diff line Loading @@ -704,6 +704,8 @@ struct Curl_handler { */ #define PROTOPT_DIRLOCK (1<<3) #define PROTOPT_NONETWORK (1<<4) /* protocol doesn't use the network! */ #define PROTOPT_NEEDSPWD (1<<5) /* needs a password, and if none is set it gets a default */ /* return the count of bytes sent, or -1 on error */ Loading Loading
lib/ftp.c +3 −2 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ const struct Curl_handler Curl_handler_ftp = { ZERO_NULL, /* readwrite */ PORT_FTP, /* defport */ CURLPROTO_FTP, /* protocol */ PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */ PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */ }; Loading @@ -206,7 +206,8 @@ const struct Curl_handler Curl_handler_ftps = { ZERO_NULL, /* readwrite */ PORT_FTPS, /* defport */ CURLPROTO_FTP | CURLPROTO_FTPS, /* protocol */ PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */ PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */ }; #endif Loading
lib/imap.c +2 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ const struct Curl_handler Curl_handler_imap = { ZERO_NULL, /* readwrite */ PORT_IMAP, /* defport */ CURLPROTO_IMAP, /* protocol */ PROTOPT_CLOSEACTION /* flags */ PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */ }; Loading @@ -154,7 +154,7 @@ const struct Curl_handler Curl_handler_imaps = { ZERO_NULL, /* readwrite */ PORT_IMAPS, /* defport */ CURLPROTO_IMAP | CURLPROTO_IMAPS, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */ PROTOPT_CLOSEACTION | PROTOPT_SSL | PROTOPT_NEEDSPWD /* flags */ }; #endif Loading
lib/url.c +1 −1 Original line number Diff line number Diff line Loading @@ -4452,7 +4452,7 @@ static CURLcode set_userpass(struct connectdata *conn, const char *user, const char *passwd) { /* If our protocol needs a password and we have none, use the defaults */ if((conn->handler->protocol & (CURLPROTO_FTP|CURLPROTO_IMAP)) && if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_passwd) { conn->user = strdup(CURL_DEFAULT_USER); Loading
lib/urldata.h +3 −1 Original line number Diff line number Diff line Loading @@ -704,6 +704,8 @@ struct Curl_handler { */ #define PROTOPT_DIRLOCK (1<<3) #define PROTOPT_NONETWORK (1<<4) /* protocol doesn't use the network! */ #define PROTOPT_NEEDSPWD (1<<5) /* needs a password, and if none is set it gets a default */ /* return the count of bytes sent, or -1 on error */ Loading