[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gsasl branch, master, updated. gsasl-1-8-0-10-gddb53a7
From: |
Simon Josefsson |
Subject: |
[SCM] GNU gsasl branch, master, updated. gsasl-1-8-0-10-gddb53a7 |
Date: |
Wed, 12 Sep 2012 12:29:52 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gsasl".
http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=ddb53a7d228880fdabaebc87d7424761c6d8a4b7
The branch, master has been updated
via ddb53a7d228880fdabaebc87d7424761c6d8a4b7 (commit)
from f7d306f34b1d465ee951ab75c66e3d3e2f7b55b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ddb53a7d228880fdabaebc87d7424761c6d8a4b7
Author: Simon Josefsson <address@hidden>
Date: Wed Sep 12 14:29:13 2012 +0200
gsasl: IMAP client code now permits empty SASL tokens prefixed with '+'.
Normally servers should send '+ '. Buggy servers include Microsoft
Exchange. Reported by Adam Sjøgren.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 ++++
src/imap.c | 14 +++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/NEWS b/NEWS
index 2909679..222d63b 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,10 @@ SASL. That include the manual, the command line tool, and
self tests.
* Version 1.8.1 (unreleased) [stable]
+** gsasl: IMAP client code now permits empty SASL tokens prefixed with '+'.
+Normally servers should send '+ '. Buggy servers include Microsoft
+Exchange. Reported by Adam Sjøgren.
+
** GSSAPI client: Now retrieves GSASL_AUTHZID for authorization identity.
** GSSAPI client: Can now transmit an empty/missing authorization identity.
Before the GSSAPI client retrieved GSASL_AUTHID (authentication
diff --git a/src/imap.c b/src/imap.c
index 22da867..0fa6a4e 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -175,13 +175,17 @@ imap_step_recv (char **data)
if (strlen (p) >= 2 && strncmp (p, ". ", 2) == 0)
return 3;
- if (strlen (p) >= 2 && strncmp (p, "+ ", 2) != 0)
+ if (strlen (p) >= 2 && strncmp (p, "+ ", 2) == 0)
+ memmove (&p[0], &p[2], strlen (p) - 1);
+ /* This is a workaround for servers (e.g., Microsoft Exchange)
+ that return '+' instead of the correct '+ '. */
+ else if (strcmp (p, "+\n") == 0)
+ p[0] = '\0';
+ else
{
- fprintf (stderr, _("error: server did not return a token\n"));
- return 0;
+ fprintf (stderr, _("warning: server did not return a token\n"));
+ return 3;
}
-
- memmove (&p[0], &p[2], strlen (p) - 1);
}
if (p[strlen (p) - 1] == '\n')
hooks/post-receive
--
GNU gsasl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gsasl branch, master, updated. gsasl-1-8-0-10-gddb53a7,
Simon Josefsson <=