{"thread":{"id":"23201","subject":"[PATCH] imap-send: suppress warning about cleartext password with CRAM-MD5","startedAt":"2010-03-27T15:00:19Z","lastAt":"2010-03-30T10:51:24Z","messageCount":3,"participants":["Chris Webb","Junio C Hamano","Hitoshi Mitake"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"137951","messageId":"1269702019-27063-1-git-send-email-chris@arachsys.com","threadId":"23201","inReplyTo":null,"subject":"[PATCH] imap-send: suppress warning about cleartext password with CRAM-MD5","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-03-27T15:00:19Z","receivedAt":"2010-03-27T15:00:19Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"If a CRAM-MD5 challenge-response is used to authenticate to the IMAP server,\ngit imap-send shouldn't warn about the password being sent in the clear.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n imap-send.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex aeb2985..7107923 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -1226,9 +1226,6 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)\n \t\t\tfprintf(stderr, \"Skipping account %s@%s, server forbids LOGIN\\n\", srvc->user, srvc->host);\n \t\t\tgoto bail;\n \t\t}\n-\t\tif (!imap->buf.sock.ssl)\n-\t\t\timap_warn(\"*** IMAP Warning *** Password is being \"\n-\t\t\t\t  \"sent in the clear\\n\");\n \n \t\tif (srvc->auth_method) {\n \t\t\tstruct imap_cmd_cb cb;\n@@ -1253,6 +1250,9 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)\n \t\t\t\tgoto bail;\n \t\t\t}\n \t\t} else {\n+\t\t\tif (!imap->buf.sock.ssl)\n+\t\t\t\timap_warn(\"*** IMAP Warning *** Password is being \"\n+\t\t\t\t\t  \"sent in the clear\\n\");\n \t\t\tif (imap_exec(ctx, NULL, \"LOGIN \\\"%s\\\" \\\"%s\\\"\", srvc->user, srvc->pass) != RESP_OK) {\n \t\t\t\tfprintf(stderr, \"IMAP error: LOGIN failed\\n\");\n \t\t\t\tgoto bail;\n-- \n1.7.0.1\n"},{"id":"138011","messageId":"7vbpe85s7n.fsf@alter.siamese.dyndns.org","threadId":"23201","inReplyTo":"1269702019-27063-1-git-send-email-chris@arachsys.com","subject":"Re: [PATCH] imap-send: suppress warning about cleartext password with CRAM-MD5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-28T16:25:16Z","receivedAt":"2010-03-28T16:25:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Webb <chris@arachsys.com> writes:\n\n> If a CRAM-MD5 challenge-response is used to authenticate to the IMAP server,\n> git imap-send shouldn't warn about the password being sent in the clear.\n>\n> Signed-off-by: Chris Webb <chris@arachsys.com>\n> ---\n\nMakes sense.  Thanks.\n\n>  imap-send.c |    6 +++---\n>  1 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/imap-send.c b/imap-send.c\n> index aeb2985..7107923 100644\n> --- a/imap-send.c\n> +++ b/imap-send.c\n> @@ -1226,9 +1226,6 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)\n>  \t\t\tfprintf(stderr, \"Skipping account %s@%s, server forbids LOGIN\\n\", srvc->user, srvc->host);\n>  \t\t\tgoto bail;\n>  \t\t}\n> -\t\tif (!imap->buf.sock.ssl)\n> -\t\t\timap_warn(\"*** IMAP Warning *** Password is being \"\n> -\t\t\t\t  \"sent in the clear\\n\");\n>  \n>  \t\tif (srvc->auth_method) {\n>  \t\t\tstruct imap_cmd_cb cb;\n> @@ -1253,6 +1250,9 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)\n>  \t\t\t\tgoto bail;\n>  \t\t\t}\n>  \t\t} else {\n> +\t\t\tif (!imap->buf.sock.ssl)\n> +\t\t\t\timap_warn(\"*** IMAP Warning *** Password is being \"\n> +\t\t\t\t\t  \"sent in the clear\\n\");\n>  \t\t\tif (imap_exec(ctx, NULL, \"LOGIN \\\"%s\\\" \\\"%s\\\"\", srvc->user, srvc->pass) != RESP_OK) {\n>  \t\t\t\tfprintf(stderr, \"IMAP error: LOGIN failed\\n\");\n>  \t\t\t\tgoto bail;\n> -- \n> 1.7.0.1\n"},{"id":"138175","messageId":"4BB1D7AC.80508@dcl.info.waseda.ac.jp","threadId":"23201","inReplyTo":"7vbpe85s7n.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] imap-send: suppress warning about cleartext password with CRAM-MD5","fromName":"Hitoshi Mitake","fromEmail":"mitake@dcl.info.waseda.ac.jp","sentAt":"2010-03-30T10:51:24Z","receivedAt":"2010-03-30T10:51:24Z","isPatch":true,"sender":{"key":"mitake@dcl.info.waseda.ac.jp","avatar":null},"body":"On 03/29/10 01:25, Junio C Hamano wrote:\n > Chris Webb<chris@arachsys.com>  writes:\n >\n >> If a CRAM-MD5 challenge-response is used to authenticate to the IMAP \nserver,\n >> git imap-send shouldn't warn about the password being sent in the clear.\n >>\n >> Signed-off-by: Chris Webb<chris@arachsys.com>\n >> ---\n >\n > Makes sense.  Thanks.\n >\n >>   imap-send.c |    6 +++---\n >>   1 files changed, 3 insertions(+), 3 deletions(-)\n >>\n >> diff --git a/imap-send.c b/imap-send.c\n >> index aeb2985..7107923 100644\n >> --- a/imap-send.c\n >> +++ b/imap-send.c\n >> @@ -1226,9 +1226,6 @@ static struct store *imap_open_store(struct \nimap_server_conf *srvc)\n >>   \t\t\tfprintf(stderr, \"Skipping account %s@%s, server forbids \nLOGIN\\n\", srvc->user, srvc->host);\n >>   \t\t\tgoto bail;\n >>   \t\t}\n >> -\t\tif (!imap->buf.sock.ssl)\n >> -\t\t\timap_warn(\"*** IMAP Warning *** Password is being \"\n >> -\t\t\t\t  \"sent in the clear\\n\");\n >>\n >>   \t\tif (srvc->auth_method) {\n >>   \t\t\tstruct imap_cmd_cb cb;\n >> @@ -1253,6 +1250,9 @@ static struct store *imap_open_store(struct \nimap_server_conf *srvc)\n >>   \t\t\t\tgoto bail;\n >>   \t\t\t}\n >>   \t\t} else {\n >> +\t\t\tif (!imap->buf.sock.ssl)\n >> +\t\t\t\timap_warn(\"*** IMAP Warning *** Password is being \"\n >> +\t\t\t\t\t  \"sent in the clear\\n\");\n >>   \t\t\tif (imap_exec(ctx, NULL, \"LOGIN \\\"%s\\\" \\\"%s\\\"\", srvc->user, \nsrvc->pass) != RESP_OK) {\n >>   \t\t\t\tfprintf(stderr, \"IMAP error: LOGIN failed\\n\");\n >>   \t\t\t\tgoto bail;\n >> --\n >> 1.7.0.1\n >\n\nThanks Chris, this was my mistake.\nAnd thanks for your notify, Junio.\n\n     Hitoshi\n"}]}