matrix-org / matrix-synapse-ldap3

An LDAP3 auth provider for Synapse
Apache License 2.0
128 stars 46 forks source link

Fix check_auth to return `None` on failure, not `False` #148

Closed reivilibre closed 2 years ago

reivilibre commented 2 years ago

See https://matrix-org.github.io/synapse/latest/password_auth_providers.html#optional-methods

Also note that the source code of Synapse suggests the return value of False triggers an error.

reivilibre commented 2 years ago

I'm having trouble unwrapping the many layers of code we have for these

I have to say I do relate to this statement. I've never seen a more confusing module system, though maybe I'm just too used to seeing this kind of thing in Java. :confounded:

Related lines:

Out of interest, check_3pid_auth has the same set-up, but the LDAP3 module is set up properly.