Fix for #1389 (import ldap users with whitespaces)

This commit is contained in:
Ozzieisaacs 2020-05-12 16:13:56 +02:00
parent b48afa38ac
commit 42abe28cc1

View File

@ -316,7 +316,7 @@ def import_ldap_users():
match = re.search("([a-zA-Z0-9-]+)=%s", config.config_ldap_user_object, re.IGNORECASE | re.UNICODE) match = re.search("([a-zA-Z0-9-]+)=%s", config.config_ldap_user_object, re.IGNORECASE | re.UNICODE)
if match: if match:
match_filter = match.group(1) match_filter = match.group(1)
match = re.search(match_filter + "=([[\d\w-]+)", user, re.IGNORECASE | re.UNICODE) match = re.search(match_filter + "=([\d\s\w-]+)", user, re.IGNORECASE | re.UNICODE)
if match: if match:
user = match.group(1) user = match.group(1)
else: else: