hswaw/customs: fix openvpn member auth

Change-Id: I3f29d45563772d9bf90aa107ee4e90dc86435123
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1458
Reviewed-by: informatic <informatic@hackerspace.pl>
This commit is contained in:
vuko 2022-12-31 05:05:11 +01:00
parent ca6dba9902
commit a5dd6d5338

View file

@ -11,7 +11,7 @@ def check_member(uid: str, password: str):
escaped_uid = escape_filter_chars(uid)
user_dn = f"uid={escaped_uid},ou=People,dc=hackerspace,dc=pl"
tls_configuration = ldap3.Tls(validate=ssl.CERT_REQUIRED, version=ssl.PROTOCOL_TLSv1)
tls_configuration = ldap3.Tls(validate=ssl.CERT_REQUIRED)
server = ldap3.Server("ldap.hackerspace.pl", use_ssl=True, tls=tls_configuration)
with ldap3.Connection(server, user=user_dn, password=password, raise_exceptions=True) as conn:
filterstr = (