diff --git a/files/routes/votes.py b/files/routes/votes.py index dcb4a4680..afc9a58d3 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -61,6 +61,8 @@ def admin_vote_info_get(v): @validate_formkey def api_vote_post(post_id, new, v): + if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403 + if new not in ["-1", "0", "1"]: abort(400) if request.headers.get("Authorization"): abort(403) @@ -118,6 +120,8 @@ def api_vote_post(post_id, new, v): @validate_formkey def api_vote_comment(comment_id, new, v): + if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403 + if new not in ["-1", "0", "1"]: abort(400) if request.headers.get("Authorization"): abort(403)