mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 08:30:12 +01:00
added quotes around the password to support special characters in the LOGIN command
This commit is contained in:
parent
ac104923c3
commit
f522ed9267
@ -259,7 +259,7 @@ int connect_to_imap_server(int sd, int *seq, char *server, char *username, char
|
|||||||
|
|
||||||
|
|
||||||
snprintf(tag, sizeof(tag)-1, "A%d", *seq); snprintf(tagok, sizeof(tagok)-1, "A%d OK", (*seq)++);
|
snprintf(tag, sizeof(tag)-1, "A%d", *seq); snprintf(tagok, sizeof(tagok)-1, "A%d OK", (*seq)++);
|
||||||
snprintf(buf, sizeof(buf)-1, "%s LOGIN %s %s\r\n", tag, username, password);
|
snprintf(buf, sizeof(buf)-1, "%s LOGIN %s \"%s\"\r\n", tag, username, password);
|
||||||
|
|
||||||
write1(sd, buf, use_ssl, data->ssl);
|
write1(sd, buf, use_ssl, data->ssl);
|
||||||
n = recvtimeoutssl(sd, buf, sizeof(buf), 10, use_ssl, data->ssl);
|
n = recvtimeoutssl(sd, buf, sizeof(buf), 10, use_ssl, data->ssl);
|
||||||
|
Loading…
Reference in New Issue
Block a user