fdfd
This commit is contained in:
parent
15f7338664
commit
686a37192d
4 changed files with 9 additions and 9 deletions
|
@ -207,7 +207,7 @@ def api_comment(v):
|
||||||
ban = bans[0]
|
ban = bans[0]
|
||||||
reason = f"Remove the {ban.domain} link from your comment and try again."
|
reason = f"Remove the {ban.domain} link from your comment and try again."
|
||||||
if ban.reason:
|
if ban.reason:
|
||||||
reason += f" {ban.reason_text}"
|
reason += f" {ban.reason}"
|
||||||
|
|
||||||
#auto ban for digitally malicious content
|
#auto ban for digitally malicious content
|
||||||
if any([x.reason==4 for x in bans]):
|
if any([x.reason==4 for x in bans]):
|
||||||
|
@ -300,7 +300,7 @@ def api_comment(v):
|
||||||
BadLink.link)).first()
|
BadLink.link)).first()
|
||||||
|
|
||||||
if badlink:
|
if badlink:
|
||||||
return jsonify({"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason_text}"}), 403
|
return jsonify({"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason}"}), 403
|
||||||
# create comment
|
# create comment
|
||||||
parent_id = parent_fullname.split("_")[1]
|
parent_id = parent_fullname.split("_")[1]
|
||||||
c = Comment(author_id=v.id,
|
c = Comment(author_id=v.id,
|
||||||
|
@ -593,7 +593,7 @@ def edit_comment(cid, v):
|
||||||
return {"error":"Digitally malicious content is not allowed."}
|
return {"error":"Digitally malicious content is not allowed."}
|
||||||
|
|
||||||
if ban.reason:
|
if ban.reason:
|
||||||
reason += f" {ban.reason_text}"
|
reason += f" {ban.reason}"
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return {'error': f'A blacklisted domain was used.'}, 400
|
if request.headers.get("Authorization"): return {'error': f'A blacklisted domain was used.'}, 400
|
||||||
else: return render_template("comment_failed.html",
|
else: return render_template("comment_failed.html",
|
||||||
|
@ -622,7 +622,7 @@ def edit_comment(cid, v):
|
||||||
BadLink.link)).first()
|
BadLink.link)).first()
|
||||||
|
|
||||||
if badlink:
|
if badlink:
|
||||||
return {"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason_text}"}, 403
|
return {"error": f"Remove the following link and try again: `{check_url}`. Reason: {badlink.reason}"}, 403
|
||||||
|
|
||||||
# check spam - this should hopefully be faster
|
# check spam - this should hopefully be faster
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
|
|
|
@ -238,7 +238,7 @@ def edit_post(pid, v):
|
||||||
ban = bans[0]
|
ban = bans[0]
|
||||||
reason = f"Remove the {ban.domain} link from your post and try again."
|
reason = f"Remove the {ban.domain} link from your post and try again."
|
||||||
if ban.reason:
|
if ban.reason:
|
||||||
reason += f" {ban.reason_text}"
|
reason += f" {ban.reason}"
|
||||||
|
|
||||||
#auto ban for digitally malicious content
|
#auto ban for digitally malicious content
|
||||||
if any([x.reason==4 for x in bans]):
|
if any([x.reason==4 for x in bans]):
|
||||||
|
@ -727,7 +727,7 @@ def submit_post(v):
|
||||||
ban = bans[0]
|
ban = bans[0]
|
||||||
reason = f"Remove the {ban.domain} link from your post and try again."
|
reason = f"Remove the {ban.domain} link from your post and try again."
|
||||||
if ban.reason:
|
if ban.reason:
|
||||||
reason += f" {ban.reason_text}"
|
reason += f" {ban.reason}"
|
||||||
|
|
||||||
#auto ban for digitally malicious content
|
#auto ban for digitally malicious content
|
||||||
if any([x.reason==4 for x in bans]):
|
if any([x.reason==4 for x in bans]):
|
||||||
|
|
|
@ -81,7 +81,7 @@ def settings_profile_post(v):
|
||||||
ban = bans[0]
|
ban = bans[0]
|
||||||
reason = f"Remove the {ban.domain} link from your bio and try again."
|
reason = f"Remove the {ban.domain} link from your bio and try again."
|
||||||
if ban.reason:
|
if ban.reason:
|
||||||
reason += f" {ban.reason_text}"
|
reason += f" {ban.reason}"
|
||||||
|
|
||||||
#auto ban for digitally malicious content
|
#auto ban for digitally malicious content
|
||||||
if any([x.reason==4 for x in bans]):
|
if any([x.reason==4 for x in bans]):
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
{% for domain in banned_domains %}
|
{% for domain in banned_domains %}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight:bold;">{{domain}}</td>
|
<td style="font-weight:bold;">{{domain.domain}}</td>
|
||||||
<td>{{domain.reason_text}}</td>
|
<td>{{domain.reason}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue