From f3aac1b035059f1c76ae20a26f730fb00cd25751 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 8 Jan 2008 04:51:57 +0000 Subject: Fix handling of basic http auth [bugfix] git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4203 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Component.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Component.py b/src/lib/Component.py index 6465f03a0..fd9201cd1 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -42,8 +42,8 @@ class CobaltXMLRPCRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): #try httpauth if not authenticated and "Authorization" in self.headers: - #need more checking here in case its all garbled - namepass = decodestring(self.headers["Authorization"].strip("Basic ")).split(":") + binauth = self.headers['Authorization'].replace("Basic ", "") + namepass = decodestring(binauth).split(':') if self.server._authenticate_connection("bogus-method", namepass[0], namepass[1], -- cgit v1.2.3-1-g7c22