diff --git a/cps/admin.py b/cps/admin.py index b709764b..3382e566 100755 --- a/cps/admin.py +++ b/cps/admin.py @@ -1631,7 +1631,10 @@ def import_ldap_users(): imported = 0 for username in new_users: - user = username.decode('utf-8') + if isinstance(username, bytes): + user = username.decode('utf-8') + else: + user = username if '=' in user: # if member object field is empty take user object as filter if config.config_ldap_member_user_object: diff --git a/optional-requirements.txt b/optional-requirements.txt index f4f0d169..7b27a63e 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -21,7 +21,7 @@ python-Levenshtein>=0.12.0,<0.26.0 # ldap login python-ldap>=3.0.0,<3.5.0 -Flask-SimpleLDAP>=1.4.0,<1.5.0 +Flask-SimpleLDAP>=1.4.0,<2.1.0 # oauth Flask-Dance>=2.0.0,<7.1.0