Add sfsr protection and admin pwd change script for powershell

This commit is contained in:
2026-08-29 20:07:00 +03:00
parent 8a2cbe5b8b
commit 4512f78033
13 changed files with 118 additions and 5 deletions
+2
View File
@@ -12,6 +12,7 @@ from secrets import token_urlsafe
from hashlib import sha256
from flask import Flask, abort, flash, g, redirect, render_template, request, session, url_for
from flask_wtf.csrf import CSRFProtect
import pyotp
import qrcode
from werkzeug.security import check_password_hash, generate_password_hash
@@ -30,6 +31,7 @@ app.config.update(
MAIL_FROM=os.environ.get("MAIL_FROM", "noreply@eternityproject.fi"),
PUBLIC_URL=os.environ.get("PUBLIC_URL", "http://localhost:8000").rstrip("/"),
)
csrf = CSRFProtect(app)
def get_db():