[evolution-patches] fix for #313078 (gw-account-setup plugin)



hi,

The attached patch fixes 
http://bugzilla.gnome.org/show_bug.cgi?id=313078

We have to uncache the password, as in 'groupwise' by default we
remember the password. This used to keep trying to authenticate with the
old password.

This also fixes (removes) another authentication pop up dialog when
'cancel' is pressed while enabling an account.

Thanks,

Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-account-setup/ChangeLog,v
retrieving revision 1.19
diff -u -p -r1.19 ChangeLog
--- ChangeLog	4 Aug 2005 05:28:00 -0000	1.19
+++ ChangeLog	22 Aug 2005 11:53:15 -0000
@@ -1,3 +1,11 @@
+2005-08-22 Vivek Jain <jvivek novell com>
+	
+	* camel-gw-listener.c:(get_addressbook_names_from_server)
+	uncache the password if it could not authenticate, else since we
+	remember it always it kept getting wrong one 
+	use 'flags' variable which served no purpose till now
+	**Fixes #313078
+	
 2005-07-27  Sankar P  <psankar novell com>
 
 	* camel-gw-listener.c (get_addressbook_names_from_server) :
Index: camel-gw-listener.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-account-setup/camel-gw-listener.c,v
retrieving revision 1.36
diff -u -p -r1.36 camel-gw-listener.c
--- camel-gw-listener.c	4 Aug 2005 05:28:00 -0000	1.36
+++ camel-gw-listener.c	22 Aug 2005 11:53:16 -0000
@@ -434,7 +434,7 @@ get_addressbook_names_from_server (char 
 	char *uri;
 	const char *use_ssl;
 	const char *poa_address;
-	guint32 flags = E_PASSWORDS_REMEMBER_FOREVER;
+	guint32 flags = E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET;
 
 	url = camel_url_new (source_url, NULL);
         if (url == NULL) {
@@ -459,6 +459,12 @@ get_addressbook_names_from_server (char 
 	failed_auth = "";
 	cnc = NULL;
 	do {
+		/*we have to uncache the password before prompting again*/
+		if (failed_auth) {
+			e_passwords_forget_password ("Groupwise", key);
+			password = NULL;
+		}
+
 		password = e_passwords_get_password ("Groupwise", key);
 		if (!password) {
 			password_prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
@@ -466,7 +472,7 @@ get_addressbook_names_from_server (char 
 			prompt = g_strconcat (failed_auth, password_prompt, NULL);
 			g_free (password_prompt);
 			password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
-					E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember,
+					flags, &remember,
 					NULL);
 			g_free (prompt);
 
@@ -494,6 +500,8 @@ get_addressbook_names_from_server (char 
 	    
 		       
 	}
+	/*FIXME: This error message should be relocated to addressbook and should reflect 
+	 * that it actually failed to get the addressbooks*/
 	e_error_run (NULL, "mail:gw-accountsetup-error", poa_address, NULL);
 	return NULL;
 }


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