From b59ab47bc2cf7f57d54e33a2a9fb0de0b9b22be1 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 21 Jan 2025 13:18:43 +0000 Subject: extend cookie timeout to 2 years --- core/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/utils.py b/core/utils.py index bfd6eee..fa8f57b 100644 --- a/core/utils.py +++ b/core/utils.py @@ -43,7 +43,7 @@ Read this now: https://nerderati.com/a-python-epoch-timestamp-timezone-trap/ TROG = {"pagecache": {"expedition": {}}, "caves": {"gcavelookup": {}, "gcavecount": {}}} alphabet = [] sha = hashlib.new('sha256') -COOKIE_MAX_AGE = 12*60*60 # seconds +COOKIE_MAX_AGE = 2*365*24*60*60 # seconds throw = 35.0 EXPOSERVER = "expo" # hostname of the server at expo.survex.com @@ -303,8 +303,10 @@ def git_commit(cwd, message, editor, commands=[]): return commands def add_commit(fname, message, editor): - """Used to commit a survex file edited and saved in view/survex.py - and also contents.json for an edited wallet""" + """Used to commit a survex file edited and saved in view/survex.py, + also contents.json for an edited wallet, + also encrypted.json for an edited user registration + """ cwd = fname.parent filename = fname.name commands = [] @@ -312,7 +314,7 @@ def add_commit(fname, message, editor): if editor: editor = git_string(editor) else: - # 'cannot happen' as form verification has this as an obligatory field + # 'cannot happen' as form verification has this is an obligatory field editor = "Anathema Device " try: -- cgit v1.2.3