summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-07-19 11:55:39 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-07-19 11:55:39 -0400
commitbdc4f18c819da5ebff06a679f9ce6dcd51cf1732 (patch)
tree915f12a8719528587dc1a4725390c04234fda028 /src
parent3291a875339a7e5569d4232d2333fe37b1f6eac0 (diff)
downloadbcfg2-bdc4f18c819da5ebff06a679f9ce6dcd51cf1732.tar.gz
bcfg2-bdc4f18c819da5ebff06a679f9ce6dcd51cf1732.tar.bz2
bcfg2-bdc4f18c819da5ebff06a679f9ce6dcd51cf1732.zip
scrub password from error messages
Diffstat (limited to 'src')
-rw-r--r--src/lib/Proxy.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Proxy.py b/src/lib/Proxy.py
index 4cb0bbe80..bb53a24af 100644
--- a/src/lib/Proxy.py
+++ b/src/lib/Proxy.py
@@ -285,10 +285,9 @@ class XMLRPCTransport(xmlrpclib.Transport):
errcode, errmsg, headers = h.getreply()
if errcode != 200:
- raise xmlrpclib.ProtocolError(host + handler,
- errcode,
- errmsg,
- headers)
+ # scrub password from the host
+ hoststr = re.sub(r':[^@]+@', ':******@', host) + handler
+ raise xmlrpclib.ProtocolError(hoststr, errcode, errmsg, headers)
self.verbose = verbose
msglen = int(headers.dict['content-length'])