summaryrefslogtreecommitdiffstats
path: root/core/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils.py')
-rw-r--r--core/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/utils.py b/core/utils.py
index 3cb2d8a..f15d6cc 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -46,6 +46,7 @@ TROG = {"pagecache": {"expedition": {}}, "caves": {"gcavelookup": {}, "gcavecoun
alphabet = []
sha = hashlib.new('sha256')
COOKIE_MAX_AGE = 2*365*24*60*60 # seconds
+COOKIE_SHORT_TIMEOUT = 60*60 # seconds
throw = 35.0
EXPOSERVER = "expo" # hostname of the server at expo.survex.com
@@ -76,6 +77,11 @@ except:
# Opening of file for writing is going to fail currently, so decide it doesn't matter for now
pass
+def get_cookie_max_age():
+ """This is where we detect whether the machine the user is using is a shared-use device or a personbal device.
+ If it is shared-use, then we set a much shorter cookie timout period.
+ """
+ return COOKIE_MAX_AGE
def sanitize_name(name):
"""Filenames sould not contain these characters as then the system barf when it tries to use them in URLs