fix dla xiastek not secure
This commit is contained in:
2
app.py
2
app.py
@@ -990,12 +990,14 @@ def login():
|
||||
if user and check_password_hash(user.password_hash, request.form["password"]):
|
||||
session.permanent = True
|
||||
login_user(user)
|
||||
session["logged"] = True
|
||||
flash("Zalogowano pomyślnie", "success")
|
||||
return redirect(url_for("main_page"))
|
||||
flash("Nieprawidłowy login lub hasło", "danger")
|
||||
return render_template("login.html")
|
||||
|
||||
|
||||
|
||||
@app.route("/logout")
|
||||
@login_required
|
||||
def logout():
|
||||
|
Reference in New Issue
Block a user