fix force_sasl

This commit is contained in:
vuko 2023-06-17 19:53:06 +02:00
parent a274cf296e
commit dac0ccfd72

View file

@ -150,8 +150,9 @@ class HsLdap:
def force_sasl(self, uid: str):
logging.debug("setting LDAP password scheme to SASL")
c = self._c
# TODO check if '{crypt}x' can be safely removed
c.modify(
f'cn={escape_rdn(uid)},ou=People,dc=hackerspace,dc=pl',
f'uid={escape_rdn(uid)},ou=People,dc=hackerspace,dc=pl',
{'userPassword': [(MODIFY_REPLACE, ['{crypt}x', f'{uid}@HACKERSPACE.PL'])]}
)