diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-07-19 11:55:39 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-07-19 11:55:39 -0400 |
commit | bdc4f18c819da5ebff06a679f9ce6dcd51cf1732 (patch) | |
tree | 915f12a8719528587dc1a4725390c04234fda028 | |
parent | 3291a875339a7e5569d4232d2333fe37b1f6eac0 (diff) | |
download | bcfg2-bdc4f18c819da5ebff06a679f9ce6dcd51cf1732.tar.gz bcfg2-bdc4f18c819da5ebff06a679f9ce6dcd51cf1732.tar.bz2 bcfg2-bdc4f18c819da5ebff06a679f9ce6dcd51cf1732.zip |
scrub password from error messages
-rw-r--r-- | src/lib/Proxy.py | 7 |
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']) |