Browse Source

Merge branch 'gdritter/strip-login-data' of getty/lament-configuration into master

getty 11 months ago
parent
commit
1df8d65530
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lc/model.py

+ 2 - 2
lc/model.py

@@ -84,8 +84,8 @@ class User(Model):
 
     @staticmethod
     def login(user: r.User) -> Tuple["User", str]:
-        u = User.by_slug(user.name)
-        if not u.authenticate(user.password):
+        u = User.by_slug(user.name.strip())
+        if not u.authenticate(user.password.strip()):
             raise e.BadPassword(name=user.name)
         return u, user.to_token()