mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
portalapi: fix split or user/password in auth code
This commit is contained in:
parent
a1cf770e1b
commit
9a5080ea16
1 changed files with 4 additions and 5 deletions
|
@ -27,11 +27,10 @@ class Authenticator(BaseAuthenticator):
|
|||
|
||||
def _authenticate_credentials(self, credentials=None):
|
||||
|
||||
# FIXME ':' should a legit char in the password ? shall we encode the password as base64 or something idk
|
||||
if ":" not in credentials or len(credentials.split(":")) != 2:
|
||||
raise YunohostError("invalid_credentials_format")
|
||||
|
||||
username, password = credentials.split(":")
|
||||
try:
|
||||
username, password = credentials.split(":", 1)
|
||||
except ValueError:
|
||||
raise YunohostError("invalid_credentials")
|
||||
|
||||
def _reconnect():
|
||||
con = ldap.ldapobject.ReconnectLDAPObject(
|
||||
|
|
Loading…
Add table
Reference in a new issue