baruwaproject / baruwa2

Baruwa 2.0
http://www.baruwa.org
GNU General Public License v3.0
21 stars 9 forks source link

[bug] Authentication crash when more than one LDAP server is specified #130

Closed rmoesbergen closed 6 years ago

rmoesbergen commented 6 years ago

When adding more than one LDAP server to authenticate against, the following crash occurs when someone logs in:

Module weberror.errormiddleware:162 in call

app_iter = self.application(environ, sr_checker) Module beaker.middleware:155 in call return self.wrap_app(environ, session_start_response) Module repoze.who.middleware:69 in call auth_ids = self.authenticate(environ, classification, ids) Module baruwa.lib.auth.middleware:107 in authenticate userid = plugin.authenticate(environ, identity) Module baruwa.lib.auth.ldapauth:101 in authenticate .filter(self.dommodel.name == domain)\ Module sqlalchemy.orm.query:2727 in one "Multiple rows were found for one()") MultipleResultsFound: Multiple rows were found for one() CGI Variables CONTENT_TYPE'application/x-www-form-urlencoded' DOCUMENT_ROOT'/usr/lib64/python2.6/site-packages/baruwa/public' HTTPS'on'

Removing or disabling the second LDAP server fixes it. Would be nice to support more than one LDAP server (single points of failure and all that), or disable the possibility to add more than one server of the same authentication type.

akissa commented 6 years ago

Upon checking the code base i realize this has already been fixed 5 months ago. The fix will be in the next release.

I will open a feature request for the multiple auth server support.

akissa commented 6 years ago

Tracking the feature request in https://github.com/baruwaproject/baruwa2/issues/131