Browse Source

Remove whitespace before trying to log in

Getty Ritter 3 years ago
parent
commit
7534c788d3
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()