Patch: imap LOGINDISABLED does not abort if we have auth methods



	Hi,

	This patch only aborts login attempt with LOGINDISABLED if there's no
auth method available. Should help in detection and usage of these
secure auth methods for some servers.

Changelog entry:
* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
  (connect_to_server): we don't abort connection attempt if we get
  LOGINDISABLED but we have other auth methods in capabilities.

-- 
Jose Dapena Paz <jdapena igalia com>
Igalia
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 3465)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-03-05  Jose Dapena Paz  <jdapena igalia com>
+
+	* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
+	(connect_to_server): we don't abort connection attempt if we get
+	LOGINDISABLED but we have other auth methods in capabilities.
+
 2008-03-04  Philip Van Hoof <pvanhoof gnome org>
 
 	* Leave on disk, MIME parsing. Highly experimental
Index: libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
===================================================================
--- libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c	(revision 3465)
+++ libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c	(working copy)
@@ -1014,7 +1014,8 @@
 	if (!must_tls && (not_ssl || ssl_mode != MODE_TLS))
 	{
 		/* LOGINDISABLED but no SSL either? :-\ */
-		if (store->capabilities & IMAP_CAPABILITY_LOGINDISABLED) {
+		if ((g_hash_table_size (store->authtypes) == 0) &&
+		    (store->capabilities & IMAP_CAPABILITY_LOGINDISABLED)) {
 			clean_quit = TRUE;
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
 				"Failed to connect to IMAP server %s: %s",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]