Don't hash 4chan

This commit is contained in:
Mark Veidemanis 2022-08-30 09:29:04 +01:00
parent ae2004090c
commit b8a08f9615
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 9 additions and 0 deletions

View File

@ -114,6 +114,12 @@
<option value="dis">Discord</option>
{% endif %}
{% if params.source == '4ch' %}
<option selected value="4ch">4chan</option>
{% else %}
<option value="4ch">4chan</option>
{% endif %}
{% if params.source == None %}
<option selected value="all">All</option>
{% elif params.source == 'all' %}

View File

@ -171,6 +171,9 @@ def hash_list(user, data, hash_keys=False):
else:
data_copy = type(data)((data))
for index, item in enumerate(data_copy):
if "src" in item:
if item["src"] in settings.SAFE_SOURCES:
continue
if isinstance(item, dict):
for key, value in list(item.items()):
if (