Apply blocked instance to LD-Signature host (#6355)
This commit is contained in:
parent
2170c27b62
commit
c5dd9439d5
|
@ -90,6 +90,12 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
|
||||||
if (authUser.user.uri !== activity.actor) {
|
if (authUser.user.uri !== activity.actor) {
|
||||||
return `skip: LD-Signature user(${authUser.user.uri}) !== activity.actor(${activity.actor})`;
|
return `skip: LD-Signature user(${authUser.user.uri}) !== activity.actor(${activity.actor})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ブロックしてたら中断
|
||||||
|
const ldHost = extractDbHost(authUser.user.uri);
|
||||||
|
if (meta.blockedHosts.includes(ldHost)) {
|
||||||
|
return `Blocked request: ${ldHost}`;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw `skip: http-signature verification failed.`;
|
throw `skip: http-signature verification failed.`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue