From bdc4f18c819da5ebff06a679f9ce6dcd51cf1732 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 19 Jul 2011 11:55:39 -0400 Subject: scrub password from error messages --- src/lib/Proxy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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']) -- cgit v1.2.3-1-g7c22