fddf
This commit is contained in:
parent
0b8dc4aaa6
commit
b2718a9c29
1 changed files with 4 additions and 5 deletions
|
@ -520,9 +520,11 @@ def filter_title(title):
|
|||
def submit_post(v):
|
||||
|
||||
title = request.form.get("title", "")
|
||||
|
||||
url = request.form.get("url", "")
|
||||
|
||||
|
||||
if "<" in title:
|
||||
render_template("submit.html", v=v, error="Titles can't contain <", title=title[:500], url=url, body=request.form.get("body", "")), 400
|
||||
|
||||
if url:
|
||||
repost = g.db.query(Submission).join(Submission.submission_aux).filter(
|
||||
SubmissionAux.url.ilike(url),
|
||||
|
@ -544,9 +546,6 @@ def submit_post(v):
|
|||
if request.headers.get("Authorization"): return {"error": "500 character limit for titles"}, 400
|
||||
else: render_template("submit.html", v=v, error="500 character limit for titles.", title=title[:500], url=url, body=request.form.get("body", "")), 400
|
||||
|
||||
elif "<" in title:
|
||||
render_template("submit.html", v=v, error="Titles can't contain <", title=title[:500], url=url, body=request.form.get("body", "")), 400
|
||||
|
||||
parsed_url = urlparse(url)
|
||||
if not (parsed_url.scheme and parsed_url.netloc) and not request.form.get(
|
||||
"body") and not request.files.get("file", None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue