From be45c1c050399ca43128c7293a5ecf4a6bf7b99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 18 Oct 2013 22:25:45 +0200 Subject: [PATCH] Quote user and password in the roundup XML-RPC URL review1143002 (transplanted from 8d9757fd30187f3bb35287b10020dd04e320f8d6) --- tryton/common/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index c1f3d5a3da..3b0cc6dd24 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -10,6 +10,7 @@ import os import subprocess import re import logging +from functools import partial from tryton.config import CONFIG from tryton.config import TRYTON_ICON, PIXMAPS_DIR import time @@ -897,9 +898,10 @@ def send_bugtracker(title, msg): protocol = 'http' if ssl or hasattr(socket, 'ssl'): protocol = 'https' + quote = partial(urllib.quote, safe="!$&'()*+,;=:") server = xmlrpclib.Server( ('%s://%s:%s@' + CONFIG['roundup.xmlrpc']) - % (protocol, user, password), allow_none=True) + % (protocol, quote(user), quote(password)), allow_none=True) if hashlib: msg_md5 = hashlib.md5(msg + '\n' + title).hexdigest() else: