Project

General

Profile

Defect #22532 » Added_login_trimming_spaces_for_authentication.patch

Artur Borisovich, 2016-04-16 23:53

View differences:

app/models/user.rb (revision )
# Returns the user that matches provided login and password, or nil
def self.try_to_login(login, password, active_only=true)
login = login.to_s
login = login.to_s.strip
password = password.to_s
# Make sure no one can sign in with an empty login or password
(2-2/3)