Bughunting 2. Reconsider datamodel of mongodb and user/pass storage

This commit is contained in:
2022-03-16 15:12:27 +01:00
parent 8ac4d3efc0
commit 93156b1bc4
3 changed files with 23 additions and 12 deletions
+2 -2
View File
@@ -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"])