openbsd-ports/www/ntlmaps/patches/patch-lib_ntlmaps_basic_auth_py
2010-03-21 10:50:14 +00:00

42 lines
1.4 KiB
Plaintext

$OpenBSD: patch-lib_ntlmaps_basic_auth_py,v 1.1 2010/03/21 10:50:14 jasper Exp $
fix Basic proxy authentication
SF patch #1707147
svn rev: 939.
--- lib/ntlmaps/basic_auth.py.orig Wed Feb 3 22:55:50 2010
+++ lib/ntlmaps/basic_auth.py Wed Feb 3 22:56:47 2010
@@ -17,6 +17,8 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
+# a few bug fixes by T. Sai Deep - 28/03/2007
+
import base64
class basic_auther:
@@ -27,12 +29,12 @@ class basic_auther:
pass
#-----------------------------------------------------------------------
- def build_credentials(config_dic):
+ def build_credentials(self, config_dic):
""
msg = config_dic['USER'] + ":" + config_dic['PASSWORD']
msg = base64.encodestring(msg)
- msg = string.replace(msg3, '\012', '')
+ msg = msg.replace('\012', '')
return msg
@@ -51,7 +53,7 @@ class basic_auther:
basic_string = self.build_credentials(connection.config['GENERAL'])
tmp_client_head_obj = connection.client_head_obj.copy()
- tmp_client_head_obj.replace_param_value('Proxy-Authorization', 'Basic ' + basic_sting)
+ tmp_client_head_obj.replace_param_value('Proxy-Authorization', 'Basic ' + basic_string)
connection.logger.log('*** Sending client header (not body) with Basic auth...')
tmp_client_head_obj.send(connection.rserver_socket)