mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 09:07:28 -06:00
[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:
parent
f487fc5d4b
commit
d85727e184
9 changed files with 154 additions and 16 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"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"
|
||||
|
|
@ -72,6 +73,7 @@ type Dereferencer struct {
|
|||
converter *typeutils.Converter
|
||||
transportController transport.Controller
|
||||
mediaManager *media.Manager
|
||||
visibility *visibility.Filter
|
||||
|
||||
// all protected by State{}.FedLocks.
|
||||
derefAvatars map[string]*media.ProcessingMedia
|
||||
|
|
@ -87,6 +89,7 @@ func NewDereferencer(
|
|||
state *state.State,
|
||||
converter *typeutils.Converter,
|
||||
transportController transport.Controller,
|
||||
visFilter *visibility.Filter,
|
||||
mediaManager *media.Manager,
|
||||
) Dereferencer {
|
||||
return Dereferencer{
|
||||
|
|
@ -94,6 +97,7 @@ func NewDereferencer(
|
|||
converter: converter,
|
||||
transportController: transportController,
|
||||
mediaManager: mediaManager,
|
||||
visibility: visFilter,
|
||||
derefAvatars: make(map[string]*media.ProcessingMedia),
|
||||
derefHeaders: make(map[string]*media.ProcessingMedia),
|
||||
derefEmojis: make(map[string]*media.ProcessingEmoji),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue