pidgin: 32e63a51: Don't send Proxy-Authorization headers u...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Nov 29 11:31:50 EST 2009


-----------------------------------------------------------------
Revision: 32e63a51dbb65b8b63d134bde098d40167574148
Ancestor: 27fe35b5c7fd5b21af46c5f58bea6e31ba32e323
Author: thecrux at gmail.com
Date: 2009-11-29T16:14:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/32e63a51dbb65b8b63d134bde098d40167574148

Modified files:
        libpurple/proxy.c

ChangeLog: 

Don't send Proxy-Authorization headers until we've received a
`407 Proxy Authentication Required` response from the server.  Fixes #2910,
which has an additional component about using existing kerberos tickets that
should be moved to a new trac ticket.

-------------- next part --------------
============================================================
--- libpurple/proxy.c	9635445cccc76924bbfb3b4cf2934a0ea2425e74
+++ libpurple/proxy.c	d2f4232885d1987d012511c354e31560180ecae5
@@ -1099,36 +1099,6 @@ http_start_connect_tunneling(PurpleProxy
 			connect_data->host, connect_data->port,
 			connect_data->host, connect_data->port);
 
-	if (purple_proxy_info_get_username(connect_data->gpi) != NULL)
-	{
-		char *t1, *t2, *ntlm_type1;
-		char hostname[256];
-
-		ret = gethostname(hostname, sizeof(hostname));
-		hostname[sizeof(hostname) - 1] = '\0';
-		if (ret < 0 || hostname[0] == '\0') {
-			purple_debug_warning("proxy", "gethostname() failed -- is your hostname set?");
-			strcpy(hostname, "localhost");
-		}
-
-		t1 = g_strdup_printf("%s:%s",
-			purple_proxy_info_get_username(connect_data->gpi),
-			purple_proxy_info_get_password(connect_data->gpi) ?
-				purple_proxy_info_get_password(connect_data->gpi) : "");
-		t2 = purple_base64_encode((const guchar *)t1, strlen(t1));
-		g_free(t1);
-
-		ntlm_type1 = purple_ntlm_gen_type1(hostname, "");
-
-		g_string_append_printf(request,
-			"Proxy-Authorization: Basic %s\r\n"
-			"Proxy-Authorization: NTLM %s\r\n"
-			"Proxy-Connection: Keep-Alive\r\n",
-			t2, ntlm_type1);
-		g_free(ntlm_type1);
-		g_free(t2);
-	}
-
 	g_string_append(request, "\r\n");
 
 	connect_data->write_buf_len = request->len;


More information about the Commits mailing list