aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/groupwise-features/proxy-login.c
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2005-10-20 16:21:26 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2005-10-20 16:21:26 +0800
commitddec6b2a3e2f61a10e1d20ad383f30abe2a26ad7 (patch)
tree580a755540e7e5d6d449af991f9933a60f7d9dfb /plugins/groupwise-features/proxy-login.c
parent39a6b3044dbd3766ffea4a804c64ce2d680777c4 (diff)
downloadgsoc2013-evolution-ddec6b2a3e2f61a10e1d20ad383f30abe2a26ad7.tar.gz
gsoc2013-evolution-ddec6b2a3e2f61a10e1d20ad383f30abe2a26ad7.tar.zst
gsoc2013-evolution-ddec6b2a3e2f61a10e1d20ad383f30abe2a26ad7.zip
When the user forgets-password explicitly, the subsequent proxy-login
2005-10-20 Sankar P <psankar@novell.com> * proxy-login.c (org_gnome_proxy_account_login) (proxy_login_get_cnc): When the user forgets-password explicitly, the subsequent proxy-login requests are made with a NULL password leading to unexpected behavior. Fixes #312467 * proxy-login.c (proxy_login_update_tree) (proxy_login_get_cnc): Added the missing unrefs for the connection object. svn path=/trunk/; revision=30543
Diffstat (limited to 'plugins/groupwise-features/proxy-login.c')
-rw-r--r--plugins/groupwise-features/proxy-login.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c
index 079b618c1e..a0581438c2 100644
--- a/plugins/groupwise-features/proxy-login.c
+++ b/plugins/groupwise-features/proxy-login.c
@@ -237,7 +237,8 @@ proxy_login_get_cnc (EAccount *account)
url = camel_url_new (account->source->url, NULL);
char *uri = NULL, *failed_auth = NULL, *key = NULL, *prompt = NULL, *password = NULL;
const char *use_ssl, *soap_port;
-
+ gboolean remember;
+
url = camel_url_new (account->source->url, NULL);
if (url == NULL)
return NULL;
@@ -262,7 +263,12 @@ proxy_login_get_cnc (EAccount *account)
failed_auth, url->host, url->user);
password = e_passwords_get_password ("Groupwise", key);
-
+
+ if (!password)
+ password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
+ E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, NULL);
+
+ g_free (prompt);
cnc = e_gw_connection_new (uri, url->user, password);
if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) {
char *http_uri = g_strconcat ("http://", uri + 8, NULL);
@@ -270,7 +276,6 @@ proxy_login_get_cnc (EAccount *account)
g_free (http_uri);
}
- g_free (prompt);
g_free (key);
g_free (password);
g_free (uri);
@@ -333,6 +338,7 @@ proxy_soap_login (char *email)
srcAccount = pld->account;
cnc = proxy_login_get_cnc(srcAccount);
proxy_get_password (srcAccount, &user_name, &password);
+
proxy_cnc = e_gw_connection_get_proxy_connection (cnc, user_name, password, email, &permissions);
if (proxy_cnc) {
@@ -363,6 +369,7 @@ proxy_soap_login (char *email)
return;
}
+ g_object_unref (cnc);
g_free (name);
g_free (user_name);
g_free (password);
@@ -455,7 +462,8 @@ proxy_login_update_tree (void)
gtk_tree_store_set (priv->store, &iter, 0, broken_image, 1, g_strconcat(proxy_name, "\n", proxy_email, NULL), -1);
}
gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree),GTK_TREE_MODEL (priv->store));
- }
+ }
+ g_object_unref (cnc);
}
void
@@ -463,7 +471,12 @@ org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, void *data)
{
char *uri = data;
proxyLoginPrivate *priv;
-
+ EGwConnection *cnc;
+
+ /* This pops-up the password dialog in case the User has forgot-passwords explicitly */
+ cnc = proxy_login_get_cnc (mail_config_get_account_by_source_url (uri));
+ g_object_unref (cnc);
+
pld = proxy_login_new();
priv = pld->priv;
priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-login-dialog.glade", NULL, NULL);
@@ -487,7 +500,7 @@ static EPopupItem popup_items[] = {
static void
popup_free (EPopup *ep, GSList *items, void *data)
{
-g_slist_free (items);
+ g_slist_free (items);
}
void