[Pidgin] #16832: HTTP Proxy authentication sends both Basic and NTLM, fails with polipo

Pidgin trac at pidgin.im
Mon Dec 28 12:08:03 EST 2015


#16832: HTTP Proxy authentication sends both Basic and NTLM, fails with polipo
---------------------+-----------------------
 Reporter:  dx       |      Owner:
     Type:  defect   |     Status:  new
Milestone:           |  Component:  libpurple
  Version:  2.10.11  |   Keywords:
---------------------+-----------------------
 Using polipo with the following added to /etc/polipo/config:

 {{{
 authCredentials = username:password
 }}}

 Libpurple tries to connect like this:

 {{{
 CONNECT graph.facebook.com:443 HTTP/1.1
 Host: graph.facebook.com:443
 Proxy-Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
 Proxy-Authorization: NTLM
 TlRMTVNTUAABAAAAA7IAAAAAAAAlAAAABQAFACAAAABib2xzYQ==
 Proxy-Connection: Keep-Alive
 }}}

 And drops the connection.

 After making this dirty change to make the second Proxy-Authorization
 invalid, it works:

 {{{#!patch
 diff --git a/libpurple/proxy.c b/libpurple/proxy.c
 index 81ba179..e52b825 100644
 --- a/libpurple/proxy.c
 +++ b/libpurple/proxy.c
 @@ -1184,7 +1184,7 @@ http_start_connect_tunneling(PurpleProxyConnectData
 *connect_data) {

                 g_string_append_printf(request,
                         "Proxy-Authorization: Basic %s\r\n"
 -                       "Proxy-Authorization: NTLM %s\r\n"
 +                       "X-Proxy-Authorization: NTLM %s\r\n"
                         "Proxy-Connection: Keep-Alive\r\n",
                         t2, ntlm_type1);
                 g_free(ntlm_type1);
 }}}

 But of course that breaks NTLM auth.

--
Ticket URL: <https://developer.pidgin.im/ticket/16832>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list