diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-10-20 08:55:56 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-10-20 08:55:56 +0000 |
commit | 7dc8bb8e1e4f24f19fe449b8af53e9e5b2f31cc3 (patch) | |
tree | 89c179bb66e099e0c8d14c6a88713829009a3eb5 /imap | |
parent | 7debad1ea380d2fb0065e172e6fa3add71d62f57 (diff) |
Let the user skip CRAM-MD5 by entering an empty secret.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/auth.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/imap/auth.c b/imap/auth.c index b4aa06bb..5b48ec79 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -525,23 +525,27 @@ int imap_authenticate (IMAP_DATA *idata, CONNECTION *conn) ckey[0] = '\0'; snprintf (buf, sizeof (buf), _("CRAM key for %s@%s: "), user, conn->server); - if (mutt_get_field (buf, ckey, sizeof (ckey), M_PASS) != 0 || - !ckey[0]) + if (mutt_get_field (buf, ckey, sizeof (ckey), M_PASS) != 0) return -1; - else - /* strip CR */ - ckey[strlen (ckey)] = '\0'; } else strfcpy (ckey, ImapCRAMKey, sizeof (ckey)); - if ((r = imap_auth_cram_md5 (idata, user, ckey))) + if (*ckey) { - mutt_error _("CRAM-MD5 authentication failed."); - sleep (1); + if ((r = imap_auth_cram_md5 (idata, user, ckey))) + { + mutt_error _("CRAM-MD5 authentication failed."); + sleep (1); + } + else + return 0; } else - return 0; + { + mutt_message _("Skipping CRAM-MD5 authentication."); + sleep (1); + } } else dprint (2, (debugfile, "CRAM-MD5 authentication is not available\n")); |