forked from rDrama/rDrama
fdsfsd
parent
34eb58c9cb
commit
e526211cca
|
@ -156,7 +156,7 @@ def api_comment(v):
|
||||||
body = body.strip()
|
body = body.strip()
|
||||||
|
|
||||||
if v.marseyawarded:
|
if v.marseyawarded:
|
||||||
marregex = list(re.finditer("^(:!?mar\w+:\s*)+$", body))
|
marregex = list(re.finditer("^(:!?m\w+:\s*)+$", body))
|
||||||
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
||||||
|
|
||||||
if not body and not request.files.get('file'): return {"error":"You need to actually write something!"}, 400
|
if not body and not request.files.get('file'): return {"error":"You need to actually write something!"}, 400
|
||||||
|
@ -590,7 +590,7 @@ def edit_comment(cid, v):
|
||||||
body = request.values.get("body", "").strip()[:10000]
|
body = request.values.get("body", "").strip()[:10000]
|
||||||
|
|
||||||
if v.marseyawarded:
|
if v.marseyawarded:
|
||||||
marregex = list(re.finditer("^(:!?mar\w+:\s*)+$", body))
|
marregex = list(re.finditer("^(:!?m\w+:\s*)+$", body))
|
||||||
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
||||||
|
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
||||||
|
|
|
@ -215,8 +215,11 @@ def edit_post(pid, v):
|
||||||
body = request.values.get("body", "").strip()
|
body = request.values.get("body", "").strip()
|
||||||
|
|
||||||
if v.marseyawarded:
|
if v.marseyawarded:
|
||||||
marregex = list(re.finditer("^(:!?mar\w+:\s*)+$", body))
|
title = list(re.finditer("^(:!?m\w+:\s*)+$", body))
|
||||||
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
||||||
|
if body:
|
||||||
|
marregex = list(re.finditer("^(:!?m\w+:\s*)+$", body))
|
||||||
|
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
||||||
|
|
||||||
if title != p.title:
|
if title != p.title:
|
||||||
p.title = title
|
p.title = title
|
||||||
|
@ -567,8 +570,11 @@ def submit_post(v):
|
||||||
body = request.values.get("body", "").strip()
|
body = request.values.get("body", "").strip()
|
||||||
|
|
||||||
if v.marseyawarded:
|
if v.marseyawarded:
|
||||||
marregex = list(re.finditer("^(:!?mar\w+:\s*)+$", body))
|
title = list(re.finditer("^(:!?m\w+:\s*)+$", body))
|
||||||
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
||||||
|
if body:
|
||||||
|
marregex = list(re.finditer("^(:!?m\w+:\s*)+$", body))
|
||||||
|
if len(marregex) == 0: return {"error":"You need to only type marseys!"}, 403
|
||||||
|
|
||||||
dup = g.db.query(Submission).options(lazyload('*')).filter(
|
dup = g.db.query(Submission).options(lazyload('*')).filter(
|
||||||
Submission.author_id == v.id,
|
Submission.author_id == v.id,
|
||||||
|
|
Loading…
Reference in New Issue