Skip to content

Commit 10439d8

Browse files
arachsysgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5e4f614 commit 10439d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

imap-send.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,9 +1226,6 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
12261226
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n", srvc->user, srvc->host);
12271227
goto bail;
12281228
}
1229-
if (!imap->buf.sock.ssl)
1230-
imap_warn("*** IMAP Warning *** Password is being "
1231-
"sent in the clear\n");
12321229

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

0 commit comments

Comments
 (0)