##// END OF EJS Templates
Prevent LDAP authentication with empty password related problems....
Jean-Philippe Lang -
r1217:3a75b6771fa1
parent child
Show More
@@ -83,6 +83,8 class User < ActiveRecord::Base
83 83
84 84 # Returns the user that matches provided login and password, or nil
85 85 def self.try_to_login(login, password)
86 # Make sure no one can sign in with an empty password
87 return nil if password.to_s.empty?
86 88 user = find(:first, :conditions => ["login=?", login])
87 89 if user
88 90 # user is already in local database
General Comments 0
You need to be logged in to leave comments. Login now