fix force_sasl

master
vuko 2023-06-17 19:53:06 +02:00
parent a274cf296e
commit dac0ccfd72
1 changed files with 2 additions and 1 deletions

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'])]}
)