remotes/1693045480750635534/spooky-22
Aevann1 2021-12-21 22:36:48 +02:00
parent 293047492b
commit eeae84ec15
2 changed files with 0 additions and 6 deletions

View File

@ -106,10 +106,6 @@ def before_request():
g.timestamp = int(time.time())
if not request.path.startswith("/assets") and not request.path.startswith("/images") and not request.path.startswith("/hostedimages"):
session.permanent = True
if not session.get("session_id"): session["session_id"] = secrets.token_hex(52)
if request.url.startswith("http://") and "localhost" not in app.config["SERVER_NAME"]:
url = request.url.replace("http://", "https://", 1)
return redirect(url, code=301)

View File

@ -300,8 +300,6 @@ class User(Base):
@lazy
def formkey(self):
if "session_id" not in session: session["session_id"] = token_hex(52)
msg = f"{session['session_id']}+{self.id}+{self.login_nonce}"
return generate_hash(msg)