activitypub: disallow transitive activities

This might be able to circumvent the ID host equality check, which
doesn't seem like a good idea.

Probably better since most likely the following code is not properly
equipped to handle null values anyway.
This commit is contained in:
Johann150 2024-11-21 19:55:52 +01:00
parent ce5c6f8309
commit e384b1762b
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -59,6 +59,11 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
if (activity.id.length > 2048) {
return `skip: overly long id from ${signerHost}`;
}
} else {
// might want to allow null id's for transitive activites, but currently
// there are no known sensible such transitive activities that we could
// process
return "skip: non-string id";
}
// Update stats