Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method :has_required_attribute_presence? get wrong result. #267

Open
hymanljw opened this issue Dec 10, 2020 · 0 comments
Open

Method :has_required_attribute_presence? get wrong result. #267

hymanljw opened this issue Dec 10, 2020 · 0 comments

Comments

@hymanljw
Copy link

In file lib/devise_ldap_authenticatable/ldap/connection.rb:213, method has_required_attribute_presence?

@required_attributes_presence.each do |key,val|
  if val && !user.attribute_names.include?(key.to_sym)
    DeviseLdapAuthenticatable::Logger.send("User #{dn} doesn't include attribute #{key}")
    return false
  elsif !val && user.attribute_names.include?(key.to_sym) # <= This looks like a wrong logic, run the method always get false.
    DeviseLdapAuthenticatable::Logger.send("User #{dn} includes attribute #{key}")
    return false
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant