From 2bd07a0d128ff3fc898b0c22bf743c833a4734cb Mon Sep 17 00:00:00 2001 From: bashrc Date: Sat, 9 May 2026 11:01:52 +0100 Subject: [PATCH] More reserved nicknames --- posts.py | 2 +- utils.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/posts.py b/posts.py index 7a322f537..66e79369c 100644 --- a/posts.py +++ b/posts.py @@ -6738,7 +6738,7 @@ def download_announce(session, base_dir: str, http_prefix: str, str(announced_json['object']['id'])) return None - post_json_object = announced_json + post_json_object: dict = announced_json replace_you_tube(post_json_object, yt_replace_domain, system_language) replace_twitter(post_json_object, twitter_replacement_domain, system_language) diff --git a/utils.py b/utils.py index 78e003e71..a9892b196 100644 --- a/utils.py +++ b/utils.py @@ -2537,9 +2537,10 @@ def _is_reserved_name(nickname: str) -> bool: """Is the given nickname reserved for some special function? """ reserved_names: list[str] = ( - 'users', 'accounts', 'profile', 'statuses', - 'search', 'channel', - 'http', 'https', 'ipfs', 'ipns' + 'users', 'accounts', 'profile', 'statuses', 'packs', 'backend', + 'search', 'channel', 'config', 'settings', 'credentials', 'apis', + 'http', 'https', 'ipfs', 'ipns', 'laravel', 'js', 'root', 'webmail', + 'mail', 'statistics' ) if nickname in reserved_names: return True @@ -4072,7 +4073,7 @@ def check_bad_path(path: str, allow_local_network_access: bool): bad_strings: list[str] = [ '..', '/.', '%2e%2e', '%252e%252e', '/sftp.', '/sftp-', '/statistics', '/config/', 'settings.', 'credentials', '/packs/', '/backend/', - '/apis/', '/laravel/', '/js/', '/root/' + '/apis/', '/laravel/', '/js/', '/root/', '/webmail/', '/mail/' ] # allow /.well-known/...