Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def login():
user.update_last_login()
db.session.commit()
login_user(user)

session.permanent = True
next_page = request.args.get('next')
if next_page:
safe_next = next_page.replace('\\', '')
Expand All @@ -56,6 +56,7 @@ def login():
user.update_last_login()
db.session.commit()
login_user(user)
session.permanent = True

next_page = request.args.get('next')
if next_page:
Expand Down
3 changes: 2 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from datetime import timedelta

class Config:
# Core settings
Expand All @@ -10,7 +11,7 @@ class Config:
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = True # Set to True if using HTTPS
PERMANENT_SESSION_LIFETIME = 72000 # 20 hours
PERMANENT_SESSION_LIFETIME = timedelta(days=1) # 1 day session time

# JSON configuration
JSON_AS_ASCII = False
Expand Down
Loading