remotes/1693045480750635534/spooky-22
parent
20122a8252
commit
1cfb893f53
|
@ -7,7 +7,7 @@ def session_over18():
|
|||
|
||||
now = int(time.time())
|
||||
|
||||
return session.get('over_18', {}).get(1) >= now
|
||||
return session.get('over_18', 0) >= now
|
||||
|
||||
|
||||
def make_logged_out_formkey(t):
|
||||
|
|
|
@ -159,12 +159,7 @@ def error_503(e, v):
|
|||
@validate_formkey
|
||||
def allow_nsfw_logged_in(v):
|
||||
|
||||
cutoff = int(time.time()) + 3600
|
||||
|
||||
if not session.get("over_18", None):
|
||||
session["over_18"] = {}
|
||||
|
||||
session["over_18"][1] = cutoff
|
||||
if not session.get("over_18"): session["over_18"] = int(time.time()) + 3600
|
||||
|
||||
return redirect(request.form.get("redir"))
|
||||
|
||||
|
@ -183,11 +178,7 @@ def allow_nsfw_logged_out(v):
|
|||
):
|
||||
abort(403)
|
||||
|
||||
if not session.get("over_18", None):
|
||||
session["over_18"] = {}
|
||||
|
||||
cutoff = int(time.time()) + 3600
|
||||
session["over_18"][1] = cutoff
|
||||
if not session.get("over_18"): session["over_18"] = int(time.time()) + 3600
|
||||
|
||||
return redirect(request.form.get("redir"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue