git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Webb <chris@arachsys.com>
To: git@vger.kernel.org
Subject: [PATCH] imap-send: suppress warning about cleartext password with CRAM-MD5
Date: Sat, 27 Mar 2010 15:00:19 +0000	[thread overview]
Message-ID: <1269702019-27063-1-git-send-email-chris@arachsys.com> (raw)

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>
---
 imap-send.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/imap-send.c b/imap-send.c
index aeb2985..7107923 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -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;
@@ -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;
-- 
1.7.0.1

             reply	other threads:[~2010-03-27 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-27 15:00 Chris Webb [this message]
2010-03-28 16:25 ` [PATCH] imap-send: suppress warning about cleartext password with CRAM-MD5 Junio C Hamano
2010-03-30 10:51   ` Hitoshi Mitake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269702019-27063-1-git-send-email-chris@arachsys.com \
    --to=chris@arachsys.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).