force lower case login name
This commit is contained in:
parent
bdefee9d58
commit
de6ed03ad8
|
@ -134,7 +134,7 @@ async def login() -> ResponseReturnValue:
|
||||||
return redirect(resp.redirect_to)
|
return redirect(resp.redirect_to)
|
||||||
form = LoginForm()
|
form = LoginForm()
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
user = User.query.filter_by(username=form.data['name']).first() # type: Optional[User]
|
user = User.query.filter_by(username=form.data['name'].lower()).first() # type: Optional[User]
|
||||||
if user:
|
if user:
|
||||||
session['username'] = str(user.username)
|
session['username'] = str(user.username)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue