diff options
author | Dan Winship <danw@src.gnome.org> | 2001-06-25 23:40:30 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-06-25 23:40:30 +0800 |
commit | 834e3b7f7e5e7632ed9c0117d6cf633ef9c34213 (patch) | |
tree | 1cc95ca496e176912fbc3ad29964f20cf19fc1b7 /camel | |
parent | 3818583af9e5bd55136e56717fc50ef1822a76c6 (diff) | |
download | gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.tar gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.tar.gz gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.tar.bz2 gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.tar.lz gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.tar.xz gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.tar.zst gsoc2013-evolution-834e3b7f7e5e7632ed9c0117d6cf633ef9c34213.zip |
Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a
* providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
doesn't allow an extra argument to AUTHENTICATE to avoid a useless
round trip like some other SASL bindings do.
* providers/imap/camel-imap-command.c (imap_read_response): Deal
with IMAP servers that (incorrectly) return "+\r\n" rather than
"+ \r\n" for an empty continuation response.
(camel_imap_response_extract_continuation): Likewise.
svn path=/trunk/; revision=10480
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 11 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 4 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 12 |
3 files changed, 17 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index a5a593ef23..60b0acf30c 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2001-06-25 Dan Winship <danw@ximian.com> + + * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP + doesn't allow an extra argument to AUTHENTICATE to avoid a useless + round trip like some other SASL bindings do. + + * providers/imap/camel-imap-command.c (imap_read_response): Deal + with IMAP servers that (incorrectly) return "+\r\n" rather than + "+ \r\n" for an empty continuation response. + (camel_imap_response_extract_continuation): Likewise. + 2001-06-21 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (word_types_compatable): New function that diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 54df2fe5a3..ce6f60554d 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -218,7 +218,7 @@ imap_read_response (CamelImapStore *store, CamelException *ex) response->status = respbuf; /* Check for OK or continuation response. */ - if (!strncmp (respbuf, "+ ", 2)) + if (*respbuf == '+') return response; retcode = imap_next_word (respbuf); if (!strncmp (retcode, "OK", 2)) @@ -514,7 +514,7 @@ camel_imap_response_extract_continuation (CamelImapStore *store, { char *status; - if (response->status && !strncmp (response->status, "+ ", 2)) { + if (response->status && *response->status == '+') { status = response->status; response->status = NULL; CAMEL_IMAP_STORE_LOCK (store, command_lock); diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index d16a7e4a4c..eecc7b0e35 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -391,16 +391,12 @@ try_auth (CamelImapStore *store, const char *mech, CamelException *ex) CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock); - sasl = camel_sasl_new ("imap", mech, CAMEL_SERVICE (store)); - - sasl_resp = camel_sasl_challenge_base64 (sasl, NULL, ex); - - response = camel_imap_command (store, NULL, ex, "AUTHENTICATE %s%s%s", - mech, sasl_resp ? " " : "", - sasl_resp ? sasl_resp : ""); + response = camel_imap_command (store, NULL, ex, + "AUTHENTICATE %s", mech); if (!response) - goto lose; + return FALSE; + sasl = camel_sasl_new ("imap", mech, CAMEL_SERVICE (store)); while (!camel_sasl_authenticated (sasl)) { resp = camel_imap_response_extract_continuation (store, response, ex); if (!resp) |