kopia lustrzana https://github.com/snarfed/bridgy-fed
activitypub: drop japanese spam flood mitigation
this stopped (at least to BF) as of 2/24pull/910/head
rodzic
ca60c048fe
commit
4f239c92e5
|
@ -899,20 +899,6 @@ def inbox(protocol=None, id=None):
|
|||
logger.info('Dropping non-public activity')
|
||||
return 'OK'
|
||||
|
||||
# temporary, for Feb 2024 Japanese mention spam flood
|
||||
# examples:
|
||||
# https://nafo.uk/@usc1qrtm8s/111953165825053473
|
||||
# https://kish.social/@kj2hevtalc/111954393290908177
|
||||
if type == 'Create':
|
||||
obj = activity.get('object', {})
|
||||
mentions = [t for t in util.get_list(obj, 'tag') if t.get('type') == 'Mention']
|
||||
if (len(mentions) in (4, 5)
|
||||
and len(util.get_list(obj, 'attachment')) in (0, 1)
|
||||
and not obj.get('inReplyTo')
|
||||
and len(obj.get('attributedTo', '').split('/')[-1]) == 10):
|
||||
logger.warning('Ignoring, looks like Feb 2024 Japanese mention spam flood')
|
||||
return 'Ignoring, looks like Feb 2024 Japanese mention spam flood'
|
||||
|
||||
if type == 'Follow':
|
||||
# rendered mf2 HTML proxy pages (in render.py) fall back to redirecting
|
||||
# to the follow's AS2 id field, but Mastodon's Accept ids are URLs that
|
||||
|
|
Ładowanie…
Reference in New Issue