diff options
author | June McEnroe <june@causal.agency> | 2019-12-22 21:42:15 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-22 21:42:15 -0500 |
commit | 76ccd798143333a9c2cdc4dd1c2c0b6032aa7389 (patch) | |
tree | 021ca7340a9be28a3e5547fe1351c33bfcb827d0 | |
parent | Use sequence numbers rather than UIDs (diff) | |
download | imbox-76ccd798143333a9c2cdc4dd1c2c0b6032aa7389.tar.gz imbox-76ccd798143333a9c2cdc4dd1c2c0b6032aa7389.zip |
Quote user, pass and mailbox
-rw-r--r-- | imbox.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/imbox.c b/imbox.c index bdc8a16..eb611a2 100644 --- a/imbox.c +++ b/imbox.c @@ -308,11 +308,14 @@ int main(int argc, char *argv[]) { switch (tag) { break; case Untagged: { if (login) break; - fprintf(imap, "%s LOGIN %s %s\r\n", Atoms[Login], user, pass); + fprintf( + imap, "%s LOGIN \"%s\" \"%s\"\r\n", + Atoms[Login], user, pass + ); login = true; } break; case Login: { - fprintf(imap, "%s EXAMINE %s\r\n", Atoms[Examine], mailbox); + fprintf(imap, "%s EXAMINE \"%s\"\r\n", Atoms[Examine], mailbox); } break; case Examine: { fprintf(imap, "%s SEARCH CHARSET UTF-8", Atoms[Search]); |