** Fix for bug #460999
authorSrinivasa Ragavan <sragavan@src.gnome.org>
Fri, 3 Aug 2007 19:44:41 +0000 (19:44 +0000)
committerSrinivasa Ragavan <sragavan@src.gnome.org>
Fri, 3 Aug 2007 19:44:41 +0000 (19:44 +0000)
svn path=/trunk/; revision=7918

libedataserverui/ChangeLog
libedataserverui/e-passwords.c

index 771f9fd..1434c17 100644 (file)
@@ -1,5 +1,12 @@
 2007-08-04  Srinivasa Ragavan  <sragavan@novell.com>
 
+       ** Fix for bug #460999
+
+       * e-passwords.c: (ep_get_password_keyring): If the keying has null
+       data, consider that as invalid.
+
+2007-08-04  Srinivasa Ragavan  <sragavan@novell.com>
+
        ** Fix for bug #458670
 
        * e-name-selector-entry.c: (entry_activate): If there is no selectable
index 92eb807..2e233d5 100644 (file)
@@ -663,18 +663,20 @@ ep_get_password_keyring (EPassMsg *msg)
                                        {
                                                attr = &g_array_index (pattr, GnomeKeyringAttribute, i);
 
-                                               if (!strcmp(attr->name, "user")) {
+                                               if (!strcmp(attr->name, "user") && attr->value.string) {
                                                        present++;
                                                        if (strcmp (attr->value.string, uri->user))
                                                                accept = FALSE;
-                                               } else if (!strcmp(attr->name, "server")) {
+                                               } else if (!strcmp(attr->name, "server") && attr->value.string) {
                                                        present++;
                                                        if (strcmp (attr->value.string, uri->host))
                                                                accept = FALSE;                                         
                                                }
                                        }
-                                       if (present == 2 && accept)
+                                       if (present == 2 && accept) {
                                                msg->password = g_strdup (((GnomeKeyringFound *) tmp->data)->secret);
+                                               break;
+                                       }
                                }       
                        }
                }