mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 11:07:15 +00:00
shared use machine short-cookie timeout implemented for wallets and logbook edits
This commit is contained in:
@@ -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.
|
# 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.
|
# 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 = 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
|
return response
|
||||||
|
|
||||||
# Do the redirect instead of this:
|
# Do the redirect instead of this:
|
||||||
|
|||||||
@@ -978,6 +978,6 @@ def walletedit(request, path=None):
|
|||||||
"freetextsize": str(max(60, len(str(freetext)))),
|
"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
|
return edit_response
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user