mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-24 19:25:57 +00:00
Fix AttributeError when bind_dn is not defined.
In case one does not define bind_dn in ldap configuration, filter attribute is not declared. Since auth code only uses ldap_filter attribute when according LDAP mode is selected, it is safe to only declare the attribute in that case. Signed-off-by: Daniel Ehlers <sargon@toppoint.de>
This commit is contained in:
parent
448ac6cf0d
commit
e380538b59
@ -70,11 +70,11 @@ class AuthHandler(BaseHandler):
|
|||||||
self.ldap_uri = hs.config.ldap_uri
|
self.ldap_uri = hs.config.ldap_uri
|
||||||
self.ldap_start_tls = hs.config.ldap_start_tls
|
self.ldap_start_tls = hs.config.ldap_start_tls
|
||||||
self.ldap_base = hs.config.ldap_base
|
self.ldap_base = hs.config.ldap_base
|
||||||
self.ldap_filter = hs.config.ldap_filter
|
|
||||||
self.ldap_attributes = hs.config.ldap_attributes
|
self.ldap_attributes = hs.config.ldap_attributes
|
||||||
if self.ldap_mode == LDAPMode.SEARCH:
|
if self.ldap_mode == LDAPMode.SEARCH:
|
||||||
self.ldap_bind_dn = hs.config.ldap_bind_dn
|
self.ldap_bind_dn = hs.config.ldap_bind_dn
|
||||||
self.ldap_bind_password = hs.config.ldap_bind_password
|
self.ldap_bind_password = hs.config.ldap_bind_password
|
||||||
|
self.ldap_filter = hs.config.ldap_filter
|
||||||
|
|
||||||
self.hs = hs # FIXME better possibility to access registrationHandler later?
|
self.hs = hs # FIXME better possibility to access registrationHandler later?
|
||||||
self.device_handler = hs.get_device_handler()
|
self.device_handler = hs.get_device_handler()
|
||||||
|
Loading…
Reference in New Issue
Block a user