check hashes at login (not tested)

This commit is contained in:
b3yond 2018-01-09 23:00:00 +01:00
parent da421769e9
commit 5feb6cf5be

View file

@ -39,7 +39,7 @@ def login():
""" """
uname = bottle.request.forms.get('uname') uname = bottle.request.forms.get('uname')
psw = bottle.request.forms.get('psw') psw = bottle.request.forms.get('psw')
if psw == db.cur.execute("SELECT pass FROM user WHERE email=?;", (uname, )): if pylibscrypt.scrypt_mcf_check(db.cur.execute("SELECT pass FROM user WHERE email=?;", (uname, )), psw):
# :todo Generate Session Cookie and give to user # :todo Generate Session Cookie and give to user
return bottle.static_file("../static/bot.html", root="../static") return bottle.static_file("../static/bot.html", root="../static")
else: else: