aboutsummaryrefslogtreecommitdiff
path: root/api/auth/login.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-03-14 13:30:59 +0100
committerlonkaars <l.leblansch@gmail.com>2021-03-14 13:30:59 +0100
commita87831846d1f82c0da851e55c6599f6f5a24791f (patch)
tree3e34ede72623a5bfc7d29a2c30c7aa007740ae05 /api/auth/login.py
parent5b8b222cfea6e00e452bcedbd88881380281e199 (diff)
use lower() for register, search and login
Diffstat (limited to 'api/auth/login.py')
-rw-r--r--api/auth/login.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/auth/login.py b/api/auth/login.py
index 9b99ba9..045120a 100644
--- a/api/auth/login.py
+++ b/api/auth/login.py
@@ -18,7 +18,7 @@ def index():
user_id = None
user_id = user_id or cursor.execute("select user_id from users where email = ?", [email]).fetchone()
- user_id = user_id or cursor.execute("select user_id from users where username = ?", [email]).fetchone()
+ user_id = user_id or cursor.execute("select user_id from users where lower(username) = lower(?)", [email]).fetchone()
if user_id == None: return "", 401
passwd = cursor.execute("select password_hash from users where user_id = ?", [user_id[0]]).fetchone()