summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-10-16 10:55:18 -0400
committerDan Winship <danw@gnome.org>2012-10-16 10:55:18 -0400
commit501d327ad2312a97fb585369f3537563b8d296fc (patch)
treeb96a50fd07b277fda966876b3e5d53aac3eb95c8
parent3d9c0aed72554d5c0ac6fd1b620588f1da115a6f (diff)
downloadlibsoup-501d327ad2312a97fb585369f3537563b8d296fc.tar.gz
soup-auth-manager-ntlm.c: don't include the default domain in the response
If the user didn't specify a domain in their username, then send "" for the domain in the response, rather than echoing back the default domain. This is apparently more compatible with what other apps do. https://bugzilla.gnome.org/show_bug.cgi?id=624613
-rw-r--r--libsoup/soup-auth-manager-ntlm.c5
-rw-r--r--tests/ntlm-test.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/libsoup/soup-auth-manager-ntlm.c b/libsoup/soup-auth-manager-ntlm.c
index f2b67d1d..ecb9c7c0 100644
--- a/libsoup/soup-auth-manager-ntlm.c
+++ b/libsoup/soup-auth-manager-ntlm.c
@@ -459,7 +459,7 @@ ssofailure:
*slash = '\0';
username = slash + 1;
} else
- domain = conn->domain;
+ domain = g_strdup ("");
conn->response_header = soup_ntlm_response (conn->nonce,
username, password,
@@ -470,8 +470,7 @@ ssofailure:
soup_session_requeue_message (priv->session, msg);
done:
- if (domain != conn->domain)
- g_free (domain);
+ g_free (domain);
g_free (conn->domain);
conn->domain = NULL;
g_free (conn->nonce);
diff --git a/tests/ntlm-test.c b/tests/ntlm-test.c
index 00222e87..e473ba67 100644
--- a/tests/ntlm-test.c
+++ b/tests/ntlm-test.c
@@ -24,7 +24,7 @@ typedef enum {
#define NTLM_CHALLENGE "TlRMTVNTUAACAAAADAAMADAAAAABAoEAASNFZ4mrze8AAAAAAAAAAGIAYgA8AAAARABPAE0AQQBJAE4AAgAMAEQATwBNAEEASQBOAAEADABTAEUAUgBWAEUAUgAEABQAZABvAG0AYQBpAG4ALgBjAG8AbQADACIAcwBlAHIAdgBlAHIALgBkAG8AbQBhAGkAbgAuAGMAbwBtAAAAAAA="
-#define NTLM_RESPONSE_USER(response) ((response)[102] == 'E' ? NTLM_AUTHENTICATED_ALICE : NTLM_AUTHENTICATED_BOB)
+#define NTLM_RESPONSE_USER(response) ((response)[86] == 'E' ? NTLM_AUTHENTICATED_ALICE : NTLM_AUTHENTICATED_BOB)
static void
clear_state (gpointer connections, GObject *ex_connection)