From: Junio C Hamano <gitster@pobox.com>
To: Kazuki Yamaguchi <k@rhe.jp>
Cc: git@vger.kernel.org, Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Subject: Re: [PATCH 1/2] imap-send: check for NOLOGIN capability only when using LOGIN command
Date: Fri, 08 Apr 2016 11:43:44 -0700 [thread overview]
Message-ID: <xmqqd1q0vt3z.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160408140224.GB13469@chikuwa.rhe.jp> (Kazuki Yamaguchi's message of "Fri, 8 Apr 2016 23:02:24 +0900")
Kazuki Yamaguchi <k@rhe.jp> writes:
> Don't check for NOLOGIN (LOGINDISABLED) capability when imap.authMethod
> is specified.
>
> LOGINDISABLED capability doesn't forbid using AUTHENTICATE, so it should
> be allowed, or we can't connect to IMAP servers which only accepts
> AUTHENTICATE command.
Makes sense. The code with this patch applied implements "An IMAP
client which complies with this specification MUST NOT issue the
LOGIN command if this capability is present." correctly.
Will queue. Thanks.
>
> Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
> ---
> imap-send.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/imap-send.c b/imap-send.c
> index 2c52027c8445..30979f0c63cc 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -1095,11 +1095,6 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, char *f
> srvc->pass = xstrdup(cred.password);
> }
>
> - if (CAP(NOLOGIN)) {
> - fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n", srvc->user, srvc->host);
> - goto bail;
> - }
> -
> if (srvc->auth_method) {
> struct imap_cmd_cb cb;
>
> @@ -1123,6 +1118,11 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, char *f
> goto bail;
> }
> } else {
> + if (CAP(NOLOGIN)) {
> + 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");
next prev parent reply other threads:[~2016-04-08 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1460122532.git.k@rhe.jp>
2016-04-08 14:02 ` [PATCH 1/2] imap-send: check for NOLOGIN capability only when using LOGIN command Kazuki Yamaguchi
2016-04-08 18:43 ` Junio C Hamano [this message]
2016-04-08 14:02 ` [PATCH 2/2] imap-send: fix CRAM-MD5 response calculation Kazuki Yamaguchi
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=xmqqd1q0vt3z.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=k@rhe.jp \
--cc=mitake@dcl.info.waseda.ac.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.