add blank password check

This commit is contained in:
chiu 2025-01-03 08:46:53 +00:00
parent 3c44cc7782
commit 0b765697f1
1 changed files with 42 additions and 40 deletions

View File

@ -10,6 +10,7 @@ module LdapLogin::Login
_session = {'ad' => []} _session = {'ad' => []}
url = '/' url = '/'
url_method = 'redirect_to' url_method = 'redirect_to'
if !ldap_pass.blank?
ldap_hosts.each do |ldap_host| ldap_hosts.each do |ldap_host|
begin begin
ldap = Net::LDAP.new ldap = Net::LDAP.new
@ -58,6 +59,7 @@ module LdapLogin::Login
end end
end end
end end
end
if !login_flag if !login_flag
flash.now.alert = error.html_safe flash.now.alert = error.html_safe
url = 'new' url = 'new'