Merge pull request #460 from alekseymykhailov/fix_connection

fix connection with @ sign in username
This commit is contained in:
Brian May 2020-06-11 06:15:19 +10:00 committed by GitHub
commit 16b462880b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(":")