More debug

main
bashrc 2026-02-23 22:43:41 +00:00
parent 6a653a182c
commit 9e62bbd686
20 changed files with 92 additions and 66 deletions

View File

@ -21,7 +21,7 @@ def show_blog_page(self, authorized: bool,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
translate: {}, debug: str, translate: {}, debug: bool,
curr_session, curr_session,
max_posts_in_blogs_feed: int, max_posts_in_blogs_feed: int,
peertube_instances: [], peertube_instances: [],

View File

@ -217,7 +217,7 @@ def delete_button(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
recent_posts_cache: {}, recent_posts_cache: {},
max_recent_posts: int, max_recent_posts: int,
translate: {}, translate: {},

View File

@ -201,7 +201,7 @@ def announce_button(self, calling_domain: str, path: str,
post_to_outbox(self, announce_json, post_to_outbox(self, announce_json,
project_version, project_version,
self.post_to_nickname, self.post_to_nickname,
curr_session, proxy_type) curr_session, proxy_type, debug)
fitness_performance(getreq_start_time, fitness, fitness_performance(getreq_start_time, fitness,
'_GET', '_announce_button postToOutboxThread', '_GET', '_announce_button postToOutboxThread',
@ -437,7 +437,7 @@ def announce_button_undo(self, calling_domain: str, path: str,
post_to_outbox(self, new_undo_announce, post_to_outbox(self, new_undo_announce,
project_version, project_version,
self.post_to_nickname, self.post_to_nickname,
curr_session, proxy_type) curr_session, proxy_type, debug)
actor_absolute = \ actor_absolute = \
get_instance_url(calling_domain, get_instance_url(calling_domain,

View File

@ -37,7 +37,7 @@ def bookmark_button(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
@ -265,7 +265,7 @@ def bookmark_button_undo(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},

View File

@ -39,7 +39,7 @@ def like_button(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
@ -179,7 +179,7 @@ def like_button(self, calling_domain: str, path: str,
# send out the like to followers # send out the like to followers
post_to_outbox(self, like_json, project_version, None, post_to_outbox(self, like_json, project_version, None,
curr_session, proxy_type) curr_session, proxy_type, debug)
fitness_performance(getreq_start_time, fitness, fitness_performance(getreq_start_time, fitness,
'_GET', '_like_button postToOutbox', '_GET', '_like_button postToOutbox',
@ -319,7 +319,7 @@ def like_button_undo(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
@ -464,7 +464,7 @@ def like_button_undo(self, calling_domain: str, path: str,
# send out the undo like to followers # send out the undo like to followers
post_to_outbox(self, undo_like_json, post_to_outbox(self, undo_like_json,
project_version, None, project_version, None,
curr_session, proxy_type) curr_session, proxy_type, debug)
# directly undo the like within the post file # directly undo the like within the post file
if not liked_post_filename: if not liked_post_filename:

View File

@ -33,7 +33,7 @@ def mute_button(self, calling_domain: str, path: str,
onion_domain: str, i2p_domain: str, onion_domain: str, i2p_domain: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, cookie: str, getreq_start_time, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
max_recent_posts: int, max_recent_posts: int,
@ -223,7 +223,7 @@ def mute_button_undo(self, calling_domain: str, path: str,
onion_domain: str, i2p_domain: str, onion_domain: str, i2p_domain: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, cookie: str, getreq_start_time, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
max_recent_posts: int, max_recent_posts: int,

View File

@ -40,7 +40,7 @@ def reaction_button(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
@ -203,7 +203,7 @@ def reaction_button(self, calling_domain: str, path: str,
# send out the emoji reaction to followers # send out the emoji reaction to followers
post_to_outbox(self, reaction_json, project_version, None, post_to_outbox(self, reaction_json, project_version, None,
curr_session, proxy_type) curr_session, proxy_type, debug)
fitness_performance(getreq_start_time, fitness, fitness_performance(getreq_start_time, fitness,
'_GET', '_reaction_button postToOutbox', '_GET', '_reaction_button postToOutbox',
@ -347,7 +347,7 @@ def reaction_button_undo(self, calling_domain: str, path: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
signing_priv_key_pem: str, signing_priv_key_pem: str,
recent_posts_cache: {}, recent_posts_cache: {},
@ -514,7 +514,7 @@ def reaction_button_undo(self, calling_domain: str, path: str,
# send out the undo emoji reaction to followers # send out the undo emoji reaction to followers
post_to_outbox(self, undo_reaction_json, post_to_outbox(self, undo_reaction_json,
project_version, None, project_version, None,
curr_session, proxy_type) curr_session, proxy_type, debug)
# directly undo the emoji reaction within the post file # directly undo the emoji reaction within the post file
if not reaction_post_filename: if not reaction_post_filename:

View File

@ -31,7 +31,7 @@ def show_shares_feed(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, getreq_start_time, domain: str, port: int, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, shares_file_type: str, debug: bool, shares_file_type: str,
curr_session, shares_per_page: int, curr_session, shares_per_page: int,
access_keys: {}, key_shortcuts: {}, access_keys: {}, key_shortcuts: {},
city: str, city: str,
@ -224,7 +224,7 @@ def show_following_feed(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, getreq_start_time, domain: str, port: int, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
follows_per_page: int, follows_per_page: int,
access_keys: {}, key_shortcuts: {}, access_keys: {}, key_shortcuts: {},
city: str, account_timezone: {}, city: str, account_timezone: {},
@ -430,7 +430,7 @@ def show_moved_feed(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, getreq_start_time, domain: str, port: int, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
follows_per_page: int, follows_per_page: int,
access_keys: {}, access_keys: {},
key_shortcuts: {}, city: str, key_shortcuts: {}, city: str,
@ -623,7 +623,7 @@ def show_inactive_feed(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, getreq_start_time, domain: str, port: int, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
dormant_months: int, dormant_months: int,
sites_unavailable: [], sites_unavailable: [],
follows_per_page: int, follows_per_page: int,
@ -818,7 +818,7 @@ def show_followers_feed(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, getreq_start_time, domain: str, port: int, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
follows_per_page: int, follows_per_page: int,
access_keys: {}, access_keys: {},
key_shortcuts: {}, key_shortcuts: {},

View File

@ -25,7 +25,7 @@ def show_instance_actor(self, calling_domain: str,
onion_domain: str, i2p_domain: str, onion_domain: str, i2p_domain: str,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
enable_shared_inbox: bool, enable_shared_inbox: bool,
fitness: {}) -> bool: fitness: {}) -> bool:
"""Shows the instance actor """Shows the instance actor

View File

@ -59,7 +59,7 @@ def _show_post_from_file(self, post_filename: str, liked_by: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, include_create_wrapper: bool, debug: bool, include_create_wrapper: bool,
curr_session, translate: {}, curr_session, translate: {},
account_timezone: {}, account_timezone: {},
bold_reading_nicknames: {}, bold_reading_nicknames: {},
@ -232,7 +232,7 @@ def show_individual_post(self, ssml_getreq: bool, authorized: bool,
domain: str, domain_full: str, port: int, domain: str, domain_full: str, port: int,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, translate: {}, curr_session, translate: {},
account_timezone: {}, account_timezone: {},
fitness: {}, fitness: {},
@ -579,7 +579,7 @@ def show_individual_at_post(self, ssml_getreq: bool, authorized: bool,
domain: str, domain_full: str, port: int, domain: str, domain_full: str, port: int,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, translate: {}, curr_session, translate: {},
account_timezone: {}, account_timezone: {},
fitness: {}, fitness: {},
@ -737,7 +737,7 @@ def show_likers_of_post(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, cookie: str, getreq_start_time, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
bold_reading_nicknames: {}, bold_reading_nicknames: {},
translate: {}, translate: {},
theme_name: str, theme_name: str,
@ -840,7 +840,7 @@ def show_announcers_of_post(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, cookie: str, getreq_start_time, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
bold_reading_nicknames: {}, bold_reading_nicknames: {},
translate: {}, translate: {},
theme_name: str, theme_name: str,
@ -944,7 +944,7 @@ def show_replies_to_post(self, authorized: bool,
domain: str, domain_full: str, port: int, domain: str, domain_full: str, port: int,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
recent_posts_cache: {}, recent_posts_cache: {},
max_recent_posts: int, max_recent_posts: int,
translate: {}, translate: {},
@ -1246,7 +1246,7 @@ def show_notify_post(self, authorized: bool,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, translate: {}, curr_session, translate: {},
account_timezone: {}, account_timezone: {},
fitness: {}, fitness: {},
@ -1349,7 +1349,7 @@ def show_conversation_thread(self, authorized: bool,
calling_domain: str, path: str, calling_domain: str, path: str,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
debug: str, curr_session, debug: bool, curr_session,
cookie: str, ua_str: str, cookie: str, ua_str: str,
domain_full: str, domain_full: str,
onion_domain: str, onion_domain: str,

View File

@ -45,7 +45,7 @@ def show_person_profile(self, authorized: bool,
yggdrasil_domain: str, yggdrasil_domain: str,
getreq_start_time, getreq_start_time,
proxy_type: str, cookie: str, proxy_type: str, cookie: str,
debug: str, debug: bool,
curr_session, curr_session,
access_keys: {}, access_keys: {},
key_shortcuts: {}, city: str, key_shortcuts: {}, city: str,
@ -215,7 +215,7 @@ def show_person_profile(self, authorized: bool,
def show_roles(self, calling_domain: str, referer_domain: str, def show_roles(self, calling_domain: str, referer_domain: str,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, getreq_start_time, domain: str, getreq_start_time,
proxy_type: str, cookie: str, debug: str, proxy_type: str, cookie: str, debug: bool,
curr_session, default_timeline: str, curr_session, default_timeline: str,
recent_posts_cache: {}, recent_posts_cache: {},
cached_webfingers: {}, cached_webfingers: {},
@ -375,7 +375,7 @@ def show_roles(self, calling_domain: str, referer_domain: str,
def show_skills(self, calling_domain: str, referer_domain: str, def show_skills(self, calling_domain: str, referer_domain: str,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, getreq_start_time, proxy_type: str, domain: str, getreq_start_time, proxy_type: str,
cookie: str, debug: str, curr_session, cookie: str, debug: bool, curr_session,
default_timeline: str, default_timeline: str,
recent_posts_cache: {}, recent_posts_cache: {},
cached_webfingers: {}, cached_webfingers: {},

View File

@ -22,7 +22,7 @@ def reaction_picker2(self, calling_domain: str, path: str,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, domain_full: str, port: int, domain: str, domain_full: str, port: int,
getreq_start_time, cookie: str, getreq_start_time, cookie: str,
debug: str, curr_session, debug: bool, curr_session,
onion_domain: str, i2p_domain: str, onion_domain: str, i2p_domain: str,
yggdrasil_domain: str, yggdrasil_domain: str,
recent_posts_cache: {}, recent_posts_cache: {},

View File

@ -41,7 +41,7 @@ def show_media_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_media_feed: int, max_posts_in_media_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -264,7 +264,7 @@ def show_blogs_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_blogs_feed: int, max_posts_in_blogs_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -481,7 +481,7 @@ def show_news_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_news_feed: int, max_posts_in_news_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -702,7 +702,7 @@ def show_features_timeline(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_news_feed: int, max_posts_in_news_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -920,7 +920,7 @@ def show_shares_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_feed: int, max_posts_in_feed: int,
access_keys: {}, access_keys: {},
@ -1072,7 +1072,7 @@ def show_wanted_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_feed: int, max_posts_in_feed: int,
access_keys: {}, access_keys: {},
@ -1224,7 +1224,7 @@ def show_bookmarks_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_feed: int, max_posts_in_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -1436,7 +1436,7 @@ def show_outbox_timeline(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
proxy_type: str, proxy_type: str,
max_posts_in_feed: int, max_posts_in_feed: int,
@ -1650,7 +1650,7 @@ def show_mod_timeline(self, authorized: bool,
calling_domain: str, referer_domain: str, calling_domain: str, referer_domain: str,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, getreq_start_time, domain: str, port: int, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_feed: int, max_posts_in_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -1858,7 +1858,7 @@ def show_dms(self, authorized: bool,
path: str, base_dir: str, http_prefix: str, path: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_feed: int, max_posts_in_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -2074,7 +2074,7 @@ def show_replies(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
curr_session, ua_str: str, curr_session, ua_str: str,
max_posts_in_feed: int, max_posts_in_feed: int,
recent_posts_cache: {}, recent_posts_cache: {},
@ -2290,7 +2290,7 @@ def show_inbox(self, authorized: bool,
base_dir: str, http_prefix: str, base_dir: str, http_prefix: str,
domain: str, port: int, domain: str, port: int,
getreq_start_time, getreq_start_time,
cookie: str, debug: str, cookie: str, debug: bool,
recent_posts_cache: {}, curr_session, recent_posts_cache: {}, curr_session,
default_timeline: str, default_timeline: str,
max_recent_posts: int, max_recent_posts: int,

View File

@ -1321,7 +1321,8 @@ def daemon_http_post(self) -> None:
if self.outbox_authenticated: if self.outbox_authenticated:
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
self.server.project_version, None, self.server.project_version, None,
curr_session, proxy_type): curr_session, proxy_type,
self.server.debug):
if message_json.get('id'): if message_json.get('id'):
locn_str = remove_id_ending(message_json['id']) locn_str = remove_id_ending(message_json['id'])
self.headers['Location'] = locn_str self.headers['Location'] = locn_str

View File

@ -210,7 +210,8 @@ def _profile_post_save_actor(base_dir: str, http_prefix: str,
print('Sending actor update: ' + str(update_actor_json)) print('Sending actor update: ' + str(update_actor_json))
post_to_outbox(self, update_actor_json, post_to_outbox(self, update_actor_json,
project_version, nickname, project_version, nickname,
curr_session, proxy_type) curr_session, proxy_type,
self.server.debug)
# send move activity if necessary # send move activity if necessary
if send_move_activity: if send_move_activity:
move_actor_json = get_actor_move_json(actor_json) move_actor_json = get_actor_move_json(actor_json)
@ -218,7 +219,8 @@ def _profile_post_save_actor(base_dir: str, http_prefix: str,
post_to_outbox(self, move_actor_json, post_to_outbox(self, move_actor_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type) curr_session, proxy_type,
self.server.debug)
def _profile_post_memorial(base_dir: str, nickname: str, def _profile_post_memorial(base_dir: str, nickname: str,

View File

@ -276,7 +276,7 @@ def _send_reply_to_question(self, base_dir: str,
message_json['object']['name'] = answer message_json['object']['name'] = answer
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, nickname, project_version, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
post_filename = \ post_filename = \
locate_post(base_dir, nickname, domain, message_id) locate_post(base_dir, nickname, domain, message_id)
if post_filename: if post_filename:

View File

@ -129,6 +129,8 @@ def _receive_new_post_process_newpost(self, fields: {},
if not fields['message']: if not fields['message']:
# remove the pinned content from profile screen # remove the pinned content from profile screen
undo_pinned_post(base_dir, nickname, domain) undo_pinned_post(base_dir, nickname, domain)
if debug:
print('DEBUG: _receive_new_post_process_newpost no message')
return NEW_POST_SUCCESS return NEW_POST_SUCCESS
city = get_spoofed_city(city, base_dir, nickname, domain) city = get_spoofed_city(city, base_dir, nickname, domain)
@ -255,7 +257,7 @@ def _receive_new_post_process_newpost(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
populate_replies(base_dir, populate_replies(base_dir,
http_prefix, http_prefix,
domain_full, domain_full,
@ -263,6 +265,8 @@ def _receive_new_post_process_newpost(self, fields: {},
max_replies, max_replies,
debug) debug)
return NEW_POST_SUCCESS return NEW_POST_SUCCESS
if debug:
print('DEBUG: failed to post to outbox')
return NEW_POST_FAILED return NEW_POST_FAILED
@ -379,7 +383,7 @@ def _receive_new_post_process_newblog(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
refresh_newswire(base_dir) refresh_newswire(base_dir)
populate_replies(base_dir, http_prefix, domain_full, populate_replies(base_dir, http_prefix, domain_full,
message_json, message_json,
@ -677,7 +681,7 @@ def _receive_new_post_process_newunlisted(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
populate_replies(base_dir, http_prefix, domain, populate_replies(base_dir, http_prefix, domain,
message_json, message_json,
max_replies, max_replies,
@ -859,7 +863,7 @@ def _receive_new_post_process_newfollowers(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
populate_replies(base_dir, http_prefix, domain, populate_replies(base_dir, http_prefix, domain,
message_json, message_json,
max_replies, max_replies,
@ -1052,7 +1056,7 @@ def _receive_new_post_process_newdm(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
populate_replies(base_dir, http_prefix, domain, populate_replies(base_dir, http_prefix, domain,
message_json, message_json,
max_replies, max_replies,
@ -1222,7 +1226,7 @@ def _receive_new_post_process_newreminder(self, fields: {}, nickname: str,
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
return NEW_POST_SUCCESS return NEW_POST_SUCCESS
return NEW_POST_FAILED return NEW_POST_FAILED
@ -1289,7 +1293,7 @@ def _receive_new_post_process_newreport(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
return NEW_POST_SUCCESS return NEW_POST_SUCCESS
return NEW_POST_FAILED return NEW_POST_FAILED
@ -1395,7 +1399,7 @@ def _receive_new_post_process_newquestion(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
return NEW_POST_SUCCESS return NEW_POST_SUCCESS
return NEW_POST_FAILED return NEW_POST_FAILED
@ -1595,7 +1599,7 @@ def _receive_new_post_process_newreading(self, fields: {},
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type): curr_session, proxy_type, debug):
populate_replies(base_dir, http_prefix, populate_replies(base_dir, http_prefix,
domain_full, domain_full,
message_json, message_json,
@ -1736,7 +1740,8 @@ def _receive_new_post_process_newshare(self, fields: {},
post_to_outbox(self, update_actor_json, post_to_outbox(self, update_actor_json,
project_version, project_version,
nickname, nickname,
curr_session, proxy_type) curr_session, proxy_type,
debug)
if filename: if filename:
if os.path.isfile(filename): if os.path.isfile(filename):

View File

@ -221,7 +221,8 @@ def remove_share(self, calling_domain: str, cookie: str,
project_version, project_version,
share_nickname, share_nickname,
curr_session, curr_session,
proxy_type) proxy_type,
self.server.debug)
if calling_domain.endswith('.onion') and onion_domain: if calling_domain.endswith('.onion') and onion_domain:
origin_path_str = 'http://' + onion_domain + users_path origin_path_str = 'http://' + onion_domain + users_path

View File

@ -79,12 +79,15 @@ from siteactive import is_online
def post_to_outbox(self, message_json: {}, version: str, def post_to_outbox(self, message_json: {}, version: str,
post_to_nickname: str, post_to_nickname: str,
curr_session, proxy_type: str) -> bool: curr_session, proxy_type: str,
debug: bool) -> bool:
"""post is received by the outbox """post is received by the outbox
Client to server message post Client to server message post
https://www.w3.org/TR/activitypub/#client-to-server-outbox-delivery https://www.w3.org/TR/activitypub/#client-to-server-outbox-delivery
""" """
if not curr_session: if not curr_session:
if debug:
print('DEBUG: post_to_outbox no curr_session')
return False return False
if not is_online(): if not is_online():
@ -130,7 +133,7 @@ def post_to_outbox(self, message_json: {}, version: str,
self.server.person_cache, self.server.person_cache,
self.server.allow_deletion, self.server.allow_deletion,
proxy_type, version, proxy_type, version,
self.server.debug, debug,
self.server.yt_replace_domain, self.server.yt_replace_domain,
self.server.twitter_replacement_domain, self.server.twitter_replacement_domain,
self.server.show_published_date_only, self.server.show_published_date_only,
@ -214,7 +217,8 @@ def post_to_outbox_thread(self, message_json: {},
thread_with_trace(target=post_to_outbox, thread_with_trace(target=post_to_outbox,
args=(self, message_json.copy(), args=(self, message_json.copy(),
self.server.project_version, None, self.server.project_version, None,
curr_session, proxy_type), curr_session, proxy_type,
self.server.debug),
daemon=True) daemon=True)
print('Starting outbox thread') print('Starting outbox thread')
outbox_thread = \ outbox_thread = \

View File

@ -19,6 +19,7 @@ from flags import is_featured_writer
from flags import is_quote_toot from flags import is_quote_toot
from quote import quote_toots_allowed from quote import quote_toots_allowed
from timeFunctions import get_account_timezone from timeFunctions import get_account_timezone
from utils import resembles_url
from utils import get_mutuals_of_person from utils import get_mutuals_of_person
from utils import data_dir from utils import data_dir
from utils import get_post_attachments from utils import get_post_attachments
@ -333,6 +334,8 @@ def post_message_to_outbox(session, translate: {},
if has_object_dict(message_json): if has_object_dict(message_json):
# if this is "local only" and it is not local then reject the post # if this is "local only" and it is not local then reject the post
if _localonly_not_local(message_json, domain_full): if _localonly_not_local(message_json, domain_full):
if debug:
print('DEBUG: local only message is not local')
return False return False
# if quote toots are not allowed then reject the post # if quote toots are not allowed then reject the post
@ -396,14 +399,21 @@ def post_message_to_outbox(session, translate: {},
# actor should be a string # actor should be a string
actor_url = get_actor_from_post(message_json) actor_url = get_actor_from_post(message_json)
if not actor_url: if not actor_url:
if debug:
print('DEBUG: post_message_to_outbox no actor url')
return False return False
# actor should look like a url # actor should look like a url
if '://' not in actor_url or \ if not resembles_url(actor_url):
'.' not in actor_url: if debug:
print('DEBUG: post_message_to_outbox ' +
'actor does not resemble url')
return False return False
if contains_invalid_actor_url_chars(actor_url): if contains_invalid_actor_url_chars(actor_url):
if debug:
print('DEBUG: post_message_to_outbox ' +
'actor_url contains invalid characters')
return False return False
# sent by an actor on a local network address? # sent by an actor on a local network address?
@ -411,6 +421,9 @@ def post_message_to_outbox(session, translate: {},
local_network_pattern_list = get_local_network_addresses() local_network_pattern_list = get_local_network_addresses()
for local_network_pattern in local_network_pattern_list: for local_network_pattern in local_network_pattern_list:
if local_network_pattern in actor_url: if local_network_pattern in actor_url:
if debug:
print('DEBUG: post_message_to_outbox ' +
'local network not permitted')
return False return False
# is the post actor blocked? # is the post actor blocked?