diff --git a/files/__main__.py b/files/__main__.py index 65410d8c4..4f203654d 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -15,6 +15,7 @@ from sqlalchemy import * import gevent from werkzeug.middleware.proxy_fix import ProxyFix import redis +import time app = Flask(__name__, template_folder='templates') app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3) diff --git a/files/routes/posts.py b/files/routes/posts.py index c614cde0e..8f6875a8b 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -490,6 +490,8 @@ def edit_post(pid, v): elif v.bird: if len(body) > 140 : return {"error":"You have to type less than 140 characters!"}, 403 + if len(body_html) > 20000: return {"error":"Submission body too long!"}, 400 + p.body_html = body_html if request.host == "rdrama.net" and "ivermectin" in body_html.lower():