Strip username in executeLogin. Fixes #123.
This commit is contained in:
parent
2905b496fa
commit
649ba530cb
1 changed files with 2 additions and 0 deletions
|
|
@ -511,6 +511,8 @@ proc executeLogin(c: TForumData, username, password: string): string =
|
|||
select id, name, password, email, salt
|
||||
from person where (name = ? or email = ?) and isDeleted = 0
|
||||
"""
|
||||
|
||||
let username = username.strip()
|
||||
if username.len == 0:
|
||||
raise newForumError("Username cannot be empty", @["username"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue