From 1dd2335bad649804c5d96e4ceaebf1961a6fa099 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Tue, 3 Jul 2007 04:50:45 +0000 Subject: Form the password url right. svn path=/trunk/; revision=33743 --- plugins/exchange-operations/ChangeLog | 6 ++++++ plugins/exchange-operations/exchange-account-setup.c | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 99f53aad6a..b2583f6211 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,9 @@ +2007-07-03 Srinivasa Ragavan + + * exchange-account-setup.c: (owa_authenticate_user): Form the password + url same as what is used every where else, so that the query can be + avoided. + 2007-06-07 Gilles Dartiguelongue * exchange-mail-send-options.c: (org_gnome_exchange_send_options): diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c index fa63a3465a..81b2dfdece 100644 --- a/plugins/exchange-operations/exchange-account-setup.c +++ b/plugins/exchange-operations/exchange-account-setup.c @@ -422,7 +422,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) E2kAutoconfigResult result; CamelURL *url=NULL; gboolean remember_password; - char *url_string; + char *url_string, *key; const char *source_url, *id_name, *owa_url; char *at, *user; gboolean valid = FALSE; @@ -461,18 +461,25 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) exchange_params->is_ntlm = TRUE; else exchange_params->is_ntlm = FALSE; - valid = e2k_validate_user (owa_url, &url->user, exchange_params, - &remember_password, &result); + camel_url_set_authmech (url, exchange_params->is_ntlm ? "NTLM" : "Basic"); + key = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); + /* Supress the trailing slash */ + key [strlen(key) -1] = 0; + + valid = e2k_validate_user (owa_url, key, &url->user, exchange_params, + &remember_password, &result); + g_free (key); + if (!valid && result != E2K_AUTOCONFIG_CANCELLED) print_error (owa_url, result); camel_url_set_host (url, valid ? exchange_params->host : ""); + - if (valid) { - camel_url_set_authmech (url, exchange_params->is_ntlm ? "NTLM" : "Basic"); + if (valid) camel_url_set_param (url, "save-passwd", remember_password? "true" : "false"); - } + camel_url_set_param (url, "ad_server", valid ? exchange_params->ad_server: NULL); camel_url_set_param (url, "mailbox", valid ? exchange_params->mailbox : NULL); camel_url_set_param (url, "owa_path", valid ? exchange_params->owa_path : NULL); -- cgit v1.2.3