Hi

  I have enabled ldap support on OBS 2.0. It worked properly with LDAP_AUTHENTICATE=:ldap, but failed with LDAP_AUTHENTICATE=:local.

The issues occurred in find_with_ldap call (/srv/www/obs/api/lib/active_rbac_mixins/user_mixins.rb):

   entry is a local variable, should not be used out of do…end;

base64.b64encode() returns the encoded data plus a trailing newline character(‘\n’) which should be removed for password checking.

The patch file is attached for review.

 

Thanks

-vivian