summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-03-21 20:06:58 -0400
committermorpheus65535 <[email protected]>2021-03-21 20:07:25 -0400
commitcc335863e2658816b09980723ac27f848ce79ec6 (patch)
tree434c09b7b1898a2c6f9472e6d273e0ffed774bb5
parent01b1fda8fcb60f97ac76420b9dec11ed6e8de54a (diff)
downloadbazarr-cc335863e2658816b09980723ac27f848ce79ec6.tar.gz
bazarr-cc335863e2658816b09980723ac27f848ce79ec6.zip
Fixed encoding/escaping of proxy username and password #1327
-rw-r--r--bazarr/config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bazarr/config.py b/bazarr/config.py
index db5e30849..d38c4d3eb 100644
--- a/bazarr/config.py
+++ b/bazarr/config.py
@@ -3,6 +3,8 @@
import hashlib
import os
+from urllib.parse import quote_plus
+
from subliminal.cache import region
from simpleconfigparser import simpleconfigparser
@@ -372,8 +374,8 @@ def configure_captcha_func():
def configure_proxy_func():
if settings.proxy.type != 'None':
if settings.proxy.username != '' and settings.proxy.password != '':
- proxy = settings.proxy.type + '://' + settings.proxy.username + ':' + settings.proxy.password + '@' + \
- settings.proxy.url + ':' + settings.proxy.port
+ proxy = settings.proxy.type + '://' + quote_plus(settings.proxy.username) + ':' + \
+ quote_plus(settings.proxy.password) + '@' + settings.proxy.url + ':' + settings.proxy.port
else:
proxy = settings.proxy.type + '://' + settings.proxy.url + ':' + settings.proxy.port
os.environ['HTTP_PROXY'] = str(proxy)