dignajar/another-ldap-auth

Support hyphen ("-") in group names

Closed this issue · 1 comments

Currently group name that containes hyphens are handled incorrect:

Example:
a user has memberOf=CN=DE-APP-ACCESS,OU=Access,OU=Application,OU=Groups,OU=Client,OU=DE,DE=example,DC=com
--> Group name is handled as "DE" instead of "DE-APP-ACCESS".

It seems, that the regex in aldap.py / __find__match didn't include "-"
Should be
adGroup = re.match('CN=((\w*\s?_?-?]*)*)', adGroup).group(1)
instead of
adGroup = re.match('CN=((\w*\s?_?]*)*)', adGroup).group(1)

FIxed in version 2.0.2. Thank you for report the issue.