From 31f7d2d4430c1a1b05b6dbb16648f80f54c629f7 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Wed, 15 Dec 2021 10:16:02 +0200 Subject: [PATCH] Support '/' character in HTTP password It should be callers responsibility to properly encode URL. --- bitcoinrpc/authproxy.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bitcoinrpc/authproxy.py b/bitcoinrpc/authproxy.py index abebe4b..6262770 100644 --- a/bitcoinrpc/authproxy.py +++ b/bitcoinrpc/authproxy.py @@ -90,6 +90,13 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, else: port = self.__url.port (user, passwd) = (self.__url.username, self.__url.password) + try: + # This will not work with python2, try ignoring. Nothing bad + # will happen unless there are special quuoted characters in + # HTTP password. + passwd = urlparse.unquote(passwd) + except AttributeError: + pass try: user = user.encode('utf8') except AttributeError: