[evolution-ews] e_ews_connection_try_credentials_sync() asks for password when not needed
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] e_ews_connection_try_credentials_sync() asks for password when not needed
- Date: Thu, 1 Jun 2017 15:52:22 +0000 (UTC)
commit f9dffffd3d006827a29e856ec55bdf4e553041ba
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 1 17:51:03 2017 +0200
e_ews_connection_try_credentials_sync() asks for password when not needed
With NTLM authentication, when /usr/bin/ntlm_auth returns something
meaningful, it doesn't necessarily mean that it can provide password,
thus count with it in e_ews_connection_try_credentials_sync() and
return authentication result according to the password being part
of the provided credentials or not. This avoids unnecessary credentials
prompts, fox example when opening address books.
src/server/e-ews-connection.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 02f2aca..aa5f22e 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -2281,7 +2281,13 @@ e_ews_connection_try_credentials_sync (EEwsConnection *cnc,
if (auth_failed) {
g_clear_error (&local_error);
- result = E_SOURCE_AUTHENTICATION_REJECTED;
+
+ if (camel_ews_settings_get_auth_mechanism (cnc->priv->settings) !=
EWS_AUTH_TYPE_GSSAPI && (!credentials ||
+ !e_named_parameters_exists (credentials, E_SOURCE_CREDENTIAL_PASSWORD))) {
+ result = E_SOURCE_AUTHENTICATION_REQUIRED;
+ } else {
+ result = E_SOURCE_AUTHENTICATION_REJECTED;
+ }
} else {
g_propagate_error (error, local_error);
result = E_SOURCE_AUTHENTICATION_ERROR;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]