From 469da93678b3f738f65372d13dcd1ea7de390063 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 23 May 2022 11:46:50 +0200 Subject: [security] Check all involved IRIs during block checking (#593) * tidy up context keys, add otherInvolvedIRIs * add ReplyToable interface * skip block check if we own the requesting domain * add block check for other involved IRIs * use cacheable status fetch * remove unused ContextActivity * remove unused ContextActivity * add helper for unique URIs * check through CCs and clean slice * add GetAccountIDForStatusURI * add GetAccountIDForAccountURI * check blocks on involved account * add statuses to tests * add some blocked tests * go fmt * extract Tos as well as CCs * test PostInboxRequestBodyHook * add some more testActivities * deduplicate involvedAccountIDs * go fmt * use cacheable db functions, remove new functions --- internal/federation/federator_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/federation/federator_test.go') diff --git a/internal/federation/federator_test.go b/internal/federation/federator_test.go index 0988178d2..0984b405b 100644 --- a/internal/federation/federator_test.go +++ b/internal/federation/federator_test.go @@ -34,6 +34,7 @@ type FederatorStandardTestSuite struct { storage *kv.KVStore tc typeutils.TypeConverter testAccounts map[string]*gtsmodel.Account + testStatuses map[string]*gtsmodel.Status testActivities map[string]testrig.ActivityWithSignature } @@ -43,6 +44,7 @@ func (suite *FederatorStandardTestSuite) SetupSuite() { suite.storage = testrig.NewTestStorage() suite.tc = testrig.NewTestTypeConverter(suite.db) suite.testAccounts = testrig.NewTestAccounts() + suite.testStatuses = testrig.NewTestStatuses() } func (suite *FederatorStandardTestSuite) SetupTest() { -- cgit v1.2.3