server: block Create activites from blocked hosts #298
Loading…
Reference in a new issue
No description provided.
Delete branch "block-creates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This should prevent notes from blocked instances from slipping through.
Changelog: Fixed
@ -7,3 +9,4 @@
export default async (actor: CacheableRemoteUser, activity: ICreate, resolver: Resolver): Promise<void> => {
const uri = getApId(activity);
if (await shouldBlockInstance(extractDbHost(uri))) return;
Shouldn't this already be covered by resolving the activity object further down? The object being created must be from the same host, otherwise it would have been caught by this check
if (extractDbHost(actor.uri) !== extractDbHost(note.id)) {
return 'skip: host in actor.uri !== note.id';
}
. I guess it was already embedded as an object so the usual checks aren't performed due to this short circuit
if (typeof value !== 'string') {
return value;
}
. Maybe a better idea to add the matching id/url and instance blocks in that case too.
Maybe also check this at a higher level, i.e. in
performOneActivity
.Superseded by #299.
Pull request closed