Log unknown users path

main
Bob Mottram 2024-05-25 19:11:50 +01:00
parent b132717efc
commit 5fa3a7928d
2 changed files with 9 additions and 0 deletions

View File

@ -3217,6 +3217,7 @@ def _receive_announce(recent_posts_cache: {},
return False return False
actor_url = get_actor_from_post(message_json) actor_url = get_actor_from_post(message_json)
if not has_users_path(actor_url): if not has_users_path(actor_url):
print('WARN: unknown users path ' + actor_url)
if debug: if debug:
print('DEBUG: ' + print('DEBUG: ' +
'"users" or "profile" missing from actor in ' + '"users" or "profile" missing from actor in ' +
@ -3227,6 +3228,7 @@ def _receive_announce(recent_posts_cache: {},
print('DEBUG: self-boost rejected') print('DEBUG: self-boost rejected')
return False return False
if not has_users_path(message_json['object']): if not has_users_path(message_json['object']):
print('WARN: unknown users path ' + message_json['object'])
if debug: if debug:
print('DEBUG: ' + print('DEBUG: ' +
'"users", "channel" or "profile" missing in ' + '"users", "channel" or "profile" missing in ' +

View File

@ -0,0 +1,7 @@
#!/bin/bash
journalctl -u epicyon | grep ' unknown users path' > .unknown_users_paths.txt
if [ ! -f .unknown_users_paths.txt ]; then
echo 'No unknown users paths'
else
cat .unknown_users_paths.txt
fi