summaryrefslogtreecommitdiffstats
path: root/core/views
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-06-25 23:33:05 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2025-06-25 23:33:05 +0300
commitc29548db0134d85af56b822dac52502a39d69119 (patch)
treef86c4b001b6b7e4f413554d707385a630e515841 /core/views
parenta7966e714de7ed3aae5dd25c578344c934dd8572 (diff)
downloadtroggle-c29548db0134d85af56b822dac52502a39d69119.tar.gz
troggle-c29548db0134d85af56b822dac52502a39d69119.tar.bz2
troggle-c29548db0134d85af56b822dac52502a39d69119.zip
shared use machine short-cookie timeout implemented for wallets and logbook edits
Diffstat (limited to 'core/views')
-rw-r--r--core/views/logbook_edit.py2
-rw-r--r--core/views/wallets_edit.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/views/logbook_edit.py b/core/views/logbook_edit.py
index 7a79528..457fdbc 100644
--- a/core/views/logbook_edit.py
+++ b/core/views/logbook_edit.py
@@ -344,7 +344,7 @@ def logbookedit(request, year=None, slug=None):
# error settings e.g dateflag and authroflag so the user gets no feedback about bad data entered.
# so we need to pass the flags explicitly in the url and then extract them from the request in the GET bit. sigh.
response = HttpResponseRedirect(f"/logbookedit/{slug}?dateflag={dateflag}&authorflag={authorflag}")
- response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds
+ response.set_cookie('editor_id', editor, max_age=get_cookie_max_age(request)) # cookie expires after get_cookie_max_age(request) seconds
return response
# Do the redirect instead of this:
diff --git a/core/views/wallets_edit.py b/core/views/wallets_edit.py
index a6bedeb..113c914 100644
--- a/core/views/wallets_edit.py
+++ b/core/views/wallets_edit.py
@@ -978,6 +978,6 @@ def walletedit(request, path=None):
"freetextsize": str(max(60, len(str(freetext)))),
},
)
- edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds
+ edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age(request)) # cookie expires after get_cookie_max_age(request) seconds
return edit_response