mirror of https://gitlab.com/bashrc2/epicyon
Check for expanded json
parent
81ff2a4cee
commit
c5826de158
6
inbox.py
6
inbox.py
|
|
@ -352,6 +352,12 @@ def inbox_permitted_message(domain: str, message_json: {},
|
||||||
federation_list: []) -> bool:
|
federation_list: []) -> bool:
|
||||||
""" Initial validation of whether an incoming post is permitted
|
""" Initial validation of whether an incoming post is permitted
|
||||||
"""
|
"""
|
||||||
|
if '@type' in message_json or \
|
||||||
|
'https://www.w3.org/ns/activitystreams#object' in message_json or \
|
||||||
|
'https://www.w3.org/ns/activitystreams#actor' in message_json:
|
||||||
|
print('WARN: invalid expanded json ' + str(message_json))
|
||||||
|
return False
|
||||||
|
|
||||||
if not has_actor(message_json, False):
|
if not has_actor(message_json, False):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ JSON-LD.
|
||||||
.. moduleauthor:: Dave Longley
|
.. moduleauthor:: Dave Longley
|
||||||
.. moduleauthor:: Mike Johnson
|
.. moduleauthor:: Mike Johnson
|
||||||
.. moduleauthor:: Tim McNamara <tim.mcnamara@okfn.org>
|
.. moduleauthor:: Tim McNamara <tim.mcnamara@okfn.org>
|
||||||
|
|
||||||
|
23/04/2026 Modified to remove @graph and @reverse
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__copyright__ = 'Copyright (c) 2011-2014 Digital Bazaar, Inc.'
|
__copyright__ = 'Copyright (c) 2011-2014 Digital Bazaar, Inc.'
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
journalctl -u epicyon | grep "invalid nickname\|invalid header\|invalid characters\|leech bounced\|LLM scraper\|suspicious\|contradictory browsers\|bad path\|not wordpress\|attempt to access passwords\|GET Unknown request"
|
journalctl -u epicyon | grep "invalid expanded\|invalid nickname\|invalid header\|invalid characters\|leech bounced\|LLM scraper\|suspicious\|contradictory browsers\|bad path\|not wordpress\|attempt to access passwords\|GET Unknown request"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue