diff --git a/files/routes/awards.py b/files/routes/awards.py index 1d5e072a6..42de759dc 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -362,7 +362,7 @@ def buy(v, award): @auth_required def award_post(pid, v): - if v.is_suspended and v.unban_utc == 0: return {"error": "forbidden."}, 403 + if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403 kind = request.values.get("kind", "").strip() diff --git a/files/routes/settings.py b/files/routes/settings.py index 841843b1c..6d8162018 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -904,10 +904,12 @@ def settings_content_get(v): @app.post("/settings/name_change") @limiter.limit("1/second") -@is_not_banned +@auth_required @validate_formkey def settings_name_change(v): + if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403 + new_name=request.values.get("name").strip() if new_name==v.username: