about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-09-01 03:35:37 +0200
committerGitHub <noreply@github.com>2018-09-01 03:35:37 +0200
commit50f226348fabbbef2084258406816b75ccc56763 (patch)
treef7babc313673c0c881bde7c18f5dfa6adc2af496
parent45c0f5433ca6aead4ff2ab27cf4b7b0dbd074d7f (diff)
Fix wrong string being used on login failure when using LDAP (#8534)
Fix #8527
-rw-r--r--lib/devise/ldap_authenticatable.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/devise/ldap_authenticatable.rb b/lib/devise/ldap_authenticatable.rb
index 534c7a851..6903d468d 100644
--- a/lib/devise/ldap_authenticatable.rb
+++ b/lib/devise/ldap_authenticatable.rb
@@ -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