forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-07-31 08:59:18 +02:00
parent b1b9c6391d
commit 020277b3c8
4 changed files with 13 additions and 5 deletions

View File

@ -27,7 +27,9 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
try: cid = int(cid)
except: cid = int(cid, 36)
except:
try: cid = int(cid, 36)
except: abort(404)
comment = get_comment(cid, v=v)

View File

@ -35,7 +35,9 @@ def log(v):
def log_item(id, v):
try: id = int(id)
except: id = int(id, 36)
except:
try: id = int(id, 36)
except: abort(404)
action=g.db.query(ModAction).filter_by(id=id).first()

View File

@ -493,7 +493,9 @@ def user_profile(username):
@limiter.exempt
def user_profile_uid(uid):
try: uid = int(uid)
except: uid = int(uid, 36)
except:
try: uid = int(uid, 36)
except: abort(404)
x=get_account(uid)
return redirect(x.profile_url)

View File

@ -117,8 +117,10 @@ def api_vote_comment(comment_id, new, v):
new = int(new)
try: comment_id = int(comment_id)
except: comment_id = int(comment_id, 36)
except:
try: comment_id = int(comment_id, 36)
except: abort(404)
comment = get_comment(comment_id)
# check for existing vote