openSUSE/open-build-service — pull request #61 by chkpnt (2012-09-21 16:49:45+00:00)
Title: Making authentication against LDAP more robust

When the server closes the connection, `@@ldap_search_con.nil?` in `/srv/www/obs/api/lib/active_rbac_mixins/user_mixins.rb / find_with_ldap(login, password)` doesn't catch it. `@@ldap_search_con.bound?` doesn't catch it as well.

So when an error occurs, we simply it try it a seccond time, which forces the ldap connection to reinitialize (`@@ldap_search_con` is unbound and nil)