From b50151e1200e6803f42d4615b3b9bb0132919969 Mon Sep 17 00:00:00 2001 From: TLSM Date: Mon, 27 Jun 2022 23:22:38 -0400 Subject: [PATCH] Commit db txn on comment spam 403. --- files/routes/comments.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/comments.py b/files/routes/comments.py index 28f468da5..d5f086300 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -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()