Browse Source

Fix wrong string being used on login failure when using LDAP (#8534)

Fix #8527
pull/4/head
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
50f226348f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/devise/ldap_authenticatable.rb

+ 2
- 1
lib/devise/ldap_authenticatable.rb View File

@ -25,11 +25,12 @@ module Devise
)
filter = format(Devise.ldap_search_filter, uid: Devise.ldap_uid, email: email)
if (user_info = ldap.bind_as(base: Devise.ldap_base, filter: filter, password: password))
user = User.ldap_get_user(user_info.first)
success!(user)
else
return fail(:invalid_login)
return fail(:invalid)
end
end
end

Loading…
Cancel
Save