@matheusbsbs / matheus-bagliano / commits / 10439d89eb
Fork 0

imap-send: suppress warning about cleartext password with CRAM-MD5

If a CRAM-MD5 challenge-response is used to authenticate to the IMAP server, git imap-send shouldn't warn about the password being sent in the clear. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Chris Webb committed Mar 27, 2010 at 15:00 UTC 10439d89ebe77a1fb8f05a8ad5d5f4071639bb3e
1 file changed +3 -3
imap-send.c
+3 -3
@@ -1226,9 +1226,6 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
1226 fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n", srvc->user, srvc->host);
1227 goto bail;
1228 }
1229 - if (!imap->buf.sock.ssl)
1230 - imap_warn("*** IMAP Warning *** Password is being "
1231 - "sent in the clear\n");
1229
1230 if (srvc->auth_method) {
1231 struct imap_cmd_cb cb;
@@ -1253,6 +1250,9 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
1250 goto bail;
1251 }
1252 } else {
1253 + if (!imap->buf.sock.ssl)
1254 + imap_warn("*** IMAP Warning *** Password is being "
1255 + "sent in the clear\n");
1256 if (imap_exec(ctx, NULL, "LOGIN \"%s\" \"%s\"", srvc->user, srvc->pass) != RESP_OK) {
1257 fprintf(stderr, "IMAP error: LOGIN failed\n");
1258 goto bail;