1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

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

Fix #8527
This commit is contained in:
Eugen Rochko 2018-09-01 03:35:37 +02:00 committed by GitHub
parent 45c0f5433c
commit 50f226348f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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