fix connection with @ sign in username

This commit is contained in:
Oleksii Mykhailov 2020-06-10 08:20:28 -07:00
parent 7d998f6d42
commit 500aa65693

View File

@ -76,9 +76,8 @@ def parse_hostport(rhostport):
if "@" in host:
# split username (and possible password) from the host[:port]
username, host = host.split("@")
username, host = host.rsplit("@", 1)
# Fix #410 bad username error detect
# username cannot contain an @ sign in this scenario
if ":" in username:
# this will even allow for the username to be empty
username, password = username.split(":")