username and password can be quoted (double or single)

This commit is contained in:
Andrey Pohilko
2017-02-11 08:56:07 +06:00
parent f374ecf0f1
commit 657464d477
2 changed files with 26 additions and 1 deletions

View File

@@ -62,7 +62,10 @@ class Registry:
return (None, None)
self.last_error = None
return login.split(':', 1)
(username, password) = login.split(':', 1)
username = username.strip('"').strip("'")
password = password.strip('"').strip("'")
return (username, password)
return (None, None)