Skip to content

Commit

Permalink
imap-send: suppress warning about cleartext password with CRAM-MD5
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Webb authored and Junio C Hamano committed Mar 28, 2010
1 parent 5e4f614 commit 10439d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,6 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n", srvc->user, srvc->host);
goto bail;
}
if (!imap->buf.sock.ssl)
imap_warn("*** IMAP Warning *** Password is being "
"sent in the clear\n");

if (srvc->auth_method) {
struct imap_cmd_cb cb;
Expand All @@ -1253,6 +1250,9 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
goto bail;
}
} else {
if (!imap->buf.sock.ssl)
imap_warn("*** IMAP Warning *** Password is being "
"sent in the clear\n");
if (imap_exec(ctx, NULL, "LOGIN \"%s\" \"%s\"", srvc->user, srvc->pass) != RESP_OK) {
fprintf(stderr, "IMAP error: LOGIN failed\n");
goto bail;
Expand Down

0 comments on commit 10439d8

Please sign in to comment.