summaryrefslogtreecommitdiff
path: root/internal/federation/federator.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-03-04 12:30:12 +0000
committerLibravatar GitHub <noreply@github.com>2024-03-04 12:30:12 +0000
commitd85727e184a8398ce0ffa40dfd01207342889076 (patch)
tree5ee1860f93157bb2e4649fd86224f43eaa61dd7e /internal/federation/federator.go
parent[bugfix] Sanitize incoming PropertyValue fields (#2722) (diff)
downloadgotosocial-d85727e184a8398ce0ffa40dfd01207342889076.tar.xz
[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
Diffstat (limited to 'internal/federation/federator.go')
-rw-r--r--internal/federation/federator.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/federation/federator.go b/internal/federation/federator.go
index 8377546a1..f97d73cf8 100644
--- a/internal/federation/federator.go
+++ b/internal/federation/federator.go
@@ -22,6 +22,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/federation/dereferencing"
"github.com/superseriousbusiness/gotosocial/internal/federation/federatingdb"
+ "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"
@@ -50,6 +51,7 @@ func NewFederator(
federatingDB federatingdb.DB,
transportController transport.Controller,
converter *typeutils.Converter,
+ visFilter *visibility.Filter,
mediaManager *media.Manager,
) *Federator {
clock := &Clock{}
@@ -60,7 +62,7 @@ func NewFederator(
converter: converter,
transportController: transportController,
mediaManager: mediaManager,
- Dereferencer: dereferencing.NewDereferencer(state, converter, transportController, mediaManager),
+ Dereferencer: dereferencing.NewDereferencer(state, converter, transportController, visFilter, mediaManager),
}
actor := newFederatingActor(f, f, federatingDB, clock)
f.actor = actor