[bugfix] check remote status permissibility (#2703)

* add more stringent checks for remote status permissibility

* add check for inreplyto of a remote status being a boost

* do not permit inReplyTo boost wrapper statuses

* change comment wording

* fix calls to NewFederator()

* add code comments for NotPermitted() and SetNotPermitted()

* improve comment

* check that existing != nil before attempting delete

* ensure replying account isn't suspended

* use a debug log instead of info. check for boost using ID

* shorten log string length. make info level

* add note that replying to boost wrapper status shouldn't be able to happen anyways

* update to use onFail() function
This commit is contained in:
kim 2024-03-04 12:30:12 +00:00 committed by GitHub
commit d85727e184
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 154 additions and 16 deletions

View file

@ -148,7 +148,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
spamFilter := spam.NewFilter(&state)
federatingDB := federatingdb.New(&state, typeConverter, visFilter, spamFilter)
transportController := transport.NewController(&state, federatingDB, &federation.Clock{}, client)
federator := federation.NewFederator(&state, federatingDB, transportController, typeConverter, mediaManager)
federator := federation.NewFederator(&state, federatingDB, transportController, typeConverter, visFilter, mediaManager)
// Decide whether to create a noop email
// sender (won't send emails) or a real one.