Fix parse_urls() buglets
When you expect split() to return 2 values, make sure to tell it to only do a single split.
This commit is contained in:
parent
29cb5b0b58
commit
1a8adfbceb
@ -91,8 +91,9 @@ def parse_url(url, default_exchange=None):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if "@" in host:
|
if "@" in host:
|
||||||
creds, host = host.split("@")
|
username, host = host.split("@", 1)
|
||||||
username, password = creds.split(":")
|
if ":" in username:
|
||||||
|
username, password = username.split(":", 1)
|
||||||
|
|
||||||
hosts.append({
|
hosts.append({
|
||||||
"host": host,
|
"host": host,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user