1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-17 15:37:25 +00:00

Remove trailing spaces from username during login

Upload of books working on windows without errors
This commit is contained in:
OzzieIsaacs
2016-11-12 21:28:40 +01:00
parent b86864b407
commit 0aa3ff4f6d
2 changed files with 5 additions and 5 deletions

View File

@@ -983,7 +983,7 @@ def login():
if request.method == "POST":
form = request.form.to_dict()
user = ub.session.query(ub.User).filter(ub.User.nickname == form['username']).first()
user = ub.session.query(ub.User).filter(ub.User.nickname == form['username'].strip()).first()
if user and check_password_hash(user.password, form['password']):
login_user(user, remember = True)