Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-23 01:45:08 +0300
committerJunio C Hamano <gitster@pobox.com>2016-04-23 01:45:08 +0300
commit886c76d0215ce503a5370bfcbe84dccead41fee0 (patch)
tree5971e5cd5a165af4b89d1bb6e4a118027152d920 /imap-send.c
parent3f80d16c1c0db9834806e3c430197a8d3442094c (diff)
parenteb94ee7f0f38cd24270bfb2f655cdec214a4d6e0 (diff)
Merge branch 'ky/imap-send'
Support for CRAM-MD5 authentication method in "git imap-send" did not work well. * ky/imap-send: imap-send: fix CRAM-MD5 response calculation imap-send: check for NOLOGIN capability only when using LOGIN command
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/imap-send.c b/imap-send.c
index 2c52027c84..407e46bc8c 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -890,7 +890,7 @@ static char *cram(const char *challenge_64, const char *user, const char *pass)
/* response: "<user> <digest in hex>" */
response = xstrfmt("%s %s", user, hex);
- resp_len = strlen(response) + 1;
+ resp_len = strlen(response);
response_64 = xmallocz(ENCODED_SIZE(resp_len));
encoded_len = EVP_EncodeBlock((unsigned char *)response_64,
@@ -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");