From d85727e184a8398ce0ffa40dfd01207342889076 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:30:12 +0000 Subject: [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 --- testrig/federator.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testrig/federator.go') diff --git a/testrig/federator.go b/testrig/federator.go index 8519d724c..f90aa99ab 100644 --- a/testrig/federator.go +++ b/testrig/federator.go @@ -19,6 +19,7 @@ package testrig import ( "github.com/superseriousbusiness/gotosocial/internal/federation" + "github.com/superseriousbusiness/gotosocial/internal/filter/visibility" "github.com/superseriousbusiness/gotosocial/internal/media" "github.com/superseriousbusiness/gotosocial/internal/state" "github.com/superseriousbusiness/gotosocial/internal/transport" @@ -27,5 +28,5 @@ import ( // NewTestFederator returns a federator with the given database and (mock!!) transport controller. func NewTestFederator(state *state.State, tc transport.Controller, mediaManager *media.Manager) *federation.Federator { - return federation.NewFederator(state, NewTestFederatingDB(state), tc, typeutils.NewConverter(state), mediaManager) + return federation.NewFederator(state, NewTestFederatingDB(state), tc, typeutils.NewConverter(state), visibility.NewFilter(state), mediaManager) } -- cgit v1.2.3