Added_login_trimming_spaces_for_authentication.patch

Artur Borisovich, 2016-04-16 23:53

Download (600 Bytes)

View differences:

app/models/user.rb (revision )
212 212

  
213 213
  # Returns the user that matches provided login and password, or nil
214 214
  def self.try_to_login(login, password, active_only=true)
215
    login = login.to_s
215
    login = login.to_s.strip
216 216
    password = password.to_s
217 217

  
218 218
    # Make sure no one can sign in with an empty login or password