fds
This commit is contained in:
parent
e1a2772f3f
commit
64160581f9
2 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,7 @@ from sqlalchemy import *
|
||||||
import gevent
|
import gevent
|
||||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
import redis
|
import redis
|
||||||
|
import time
|
||||||
|
|
||||||
app = Flask(__name__, template_folder='templates')
|
app = Flask(__name__, template_folder='templates')
|
||||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3)
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3)
|
||||||
|
|
|
@ -490,6 +490,8 @@ def edit_post(pid, v):
|
||||||
elif v.bird:
|
elif v.bird:
|
||||||
if len(body) > 140 : return {"error":"You have to type less than 140 characters!"}, 403
|
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
|
p.body_html = body_html
|
||||||
|
|
||||||
if request.host == "rdrama.net" and "ivermectin" in body_html.lower():
|
if request.host == "rdrama.net" and "ivermectin" in body_html.lower():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue