failsafe against overwriting permabans

master
Aevann 2024-10-21 23:28:11 +03:00
parent 87a3ac11f1
commit 8d45cf9267
1 changed files with 3 additions and 0 deletions

View File

@ -1152,6 +1152,9 @@ class User(Base):
def ban(self, admin=None, reason=None, days=0.0, modlog=True):
if self.is_permabanned:
return
if len(reason) > BAN_REASON_HTML_LENGTH_LIMIT:
stop(400, "Rendered ban reason is too long!")