Include evil domains within blocked cache

main
Bob Mottram 2025-10-06 13:51:38 +01:00
parent 8d880a4ea5
commit 56f817bc71
2 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ from utils import local_actor_url
from utils import has_actor from utils import has_actor
from utils import text_in_file from utils import text_in_file
from utils import get_actor_from_post from utils import get_actor_from_post
from utils import evil_incarnate
from conversation import mute_conversation from conversation import mute_conversation
from conversation import unmute_conversation from conversation import unmute_conversation
from auth import create_basic_auth_header from auth import create_basic_auth_header
@ -670,7 +671,7 @@ def update_blocked_cache(base_dir: str,
blocked_lines[index] = remove_eol(blocked_lines[index]) blocked_lines[index] = remove_eol(blocked_lines[index])
# update the cache # update the cache
blocked_cache.clear() blocked_cache.clear()
blocked_cache += blocked_lines blocked_cache += evil_incarnate() + blocked_lines
except OSError as ex: except OSError as ex:
print('EX: update_blocked_cache unable to read ' + print('EX: update_blocked_cache unable to read ' +
global_blocking_filename + ' ' + str(ex)) global_blocking_filename + ' ' + str(ex))

View File

@ -992,7 +992,7 @@ def load_json_onionify(filename: str, domain: str, onion_domain: str,
def evil_incarnate() -> []: def evil_incarnate() -> []:
"""Hardcoded blocked domains """Hardcoded blocked domains
""" """
return ('fedilist.com', 'gab.com', 'gabfed.com', 'spinster.xyz') return ['fedilist.com', 'gab.com', 'gabfed.com', 'spinster.xyz']
def contains_invalid_chars(json_str: str) -> bool: def contains_invalid_chars(json_str: str) -> bool: