Commit db txn on comment spam 403.

master
Snakes 2022-06-27 23:22:38 -04:00
parent 1a1b57d3d9
commit b50151e120
1 changed files with 2 additions and 0 deletions

View File

@ -333,6 +333,7 @@ def api_comment(v):
)
g.db.add(ma)
g.db.commit()
return {"error": "Too much spam!"}, 403
if len(body_html) > 20000: abort(400)
@ -715,6 +716,7 @@ def edit_comment(cid, v):
comment.ban_reason = "AutoJanny"
g.db.add(comment)
g.db.commit()
return {"error": "Too much spam!"}, 403
body += process_files()