summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-01-08 04:51:57 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-01-08 04:51:57 +0000
commitf3aac1b035059f1c76ae20a26f730fb00cd25751 (patch)
tree36e896de5842f31befde488dc01c85e9f331d421
parentd97a2114f6bf03fac3682076c8387a5ccb570946 (diff)
downloadbcfg2-f3aac1b035059f1c76ae20a26f730fb00cd25751.tar.gz
bcfg2-f3aac1b035059f1c76ae20a26f730fb00cd25751.tar.bz2
bcfg2-f3aac1b035059f1c76ae20a26f730fb00cd25751.zip
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
-rw-r--r--src/lib/Component.py4
1 files 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],