forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-02-04 16:58:41 +02:00
parent cfd6028408
commit d21c16c071
2 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ def notifications(v):
@limiter.limit("3/second;30/minute;400/hour;2000/day")
@auth_desired
def front_all(v, hole=None):
if hole not in holes: hole = None
if hole and hole not in holes: hole = None
if g.webview and not session.get("session_id"):
session.permanent = True
session["session_id"] = secrets.token_hex(49)

View File

@ -91,7 +91,7 @@ def publish(pid, v):
@app.get("/submit/<hole>")
@auth_required
def submit_get(v, hole=None):
if hole not in holes: hole = None
if hole and hole not in holes: hole = None
return render_template("submit.html", v=v, hole=hole)
@app.get("/post/<pid>")
@ -756,7 +756,7 @@ def thumbnail_thread(pid):
@limiter.limit("1/second;6/minute;200/hour;1000/day")
@auth_required
def submit_post(v, hole=None):
if hole not in holes: hole = None
if hole and hole not in holes: hole = None
if v.is_suspended: return {"error": "You can't perform this action while banned."}, 403
if v and v.patron: