From 81dc29d99aecb2f862514fb8ad64f9dae4ed1cca Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 30 Jul 2021 08:17:38 +0200 Subject: [PATCH] dffd --- drama/routes/comments.py | 6 +++--- drama/routes/votes.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drama/routes/comments.py b/drama/routes/comments.py index 565e6d22a9..7325c56dbf 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -66,10 +66,10 @@ def comment_cid_api_redirect(cid=None, pid=None): 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 Exception as e: pass + try: cid = int(cid) + except: cid = int(cid, 36) + comment = get_comment(cid, v=v) if not comment.parent_submission and not (v and v.admin_level == 6): abort(403) diff --git a/drama/routes/votes.py b/drama/routes/votes.py index df13593fd3..ce23e27ec0 100644 --- a/drama/routes/votes.py +++ b/drama/routes/votes.py @@ -120,8 +120,8 @@ def api_vote_comment(comment_id, new, v): new = int(new) - try: uid = int(comment_id) - except: uid = int(comment_id, 36) + try: comment_id = int(comment_id) + except: comment_id = int(comment_id, 36) comment = get_comment(comment_id)