activitypub: Do block checks more globally #299
Loading…
Reference in a new issue
No description provided.
Delete branch "better-blocking"
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 objects from blocked instances from slipping through because of missed checks elsewhere.
Supersedes #298.
Changelog: Fixed
@ -38,6 +40,9 @@ export async function performActivity(actor: CacheableRemoteUser, activity: IObj
async function performOneActivity(actor: CacheableRemoteUser, activity: IObject, resolver: Resolver): Promise<void> {
if (actor.isSuspended) return;
const host = extractDbHost(getApId(activity));
The same may apply here, although I'm not sure if there can be transient activities at "root level"?
@ -50,3 +50,4 @@
throw new Error('resolvee is null (or undefined)');
}
const host = extractDbHost(typeof value === 'string' ? value : getApId(value));
Transient activities may not have an
id
. IfgetApId
cannot determine an id it will throw an error. Because the resolver should be able to handle transient activities as well we might want to catch that error here.merged in
09bc3cf95a
Pull request closed