Bughunting 2. Reconsider datamodel of mongodb and user/pass storage
This commit is contained in:
@@ -22,8 +22,8 @@ def login():
|
||||
if request.method == "POST":
|
||||
username = request.form["username"]
|
||||
password = request.form["password"]
|
||||
if db.cred.find_one({"username": username, "password": password}):
|
||||
auth_user_id = db.cred.find_one({"username": username},{"uuid", 1})
|
||||
if db.user_cred.find_one({"username": username, "password": password}):
|
||||
auth_user_id = db.user_cred.find_one({"username": username},{"uuid", 1})
|
||||
if auth_user_id:
|
||||
app.logger.info(auth_user_id)
|
||||
return render_template("welcome.html", id=auth_user_id["uuid"])
|
||||
|
||||
Reference in New Issue
Block a user