mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-05-06 09:05:16 +02:00
fix connection with @ sign in username
This commit is contained in:
parent
7d998f6d42
commit
500aa65693
@ -76,9 +76,8 @@ def parse_hostport(rhostport):
|
|||||||
|
|
||||||
if "@" in host:
|
if "@" in host:
|
||||||
# split username (and possible password) from the host[:port]
|
# split username (and possible password) from the host[:port]
|
||||||
username, host = host.split("@")
|
username, host = host.rsplit("@", 1)
|
||||||
# Fix #410 bad username error detect
|
# Fix #410 bad username error detect
|
||||||
# username cannot contain an @ sign in this scenario
|
|
||||||
if ":" in username:
|
if ":" in username:
|
||||||
# this will even allow for the username to be empty
|
# this will even allow for the username to be empty
|
||||||
username, password = username.split(":")
|
username, password = username.split(":")
|
||||||
|
Loading…
Reference in New Issue
Block a user