mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 11:27:31 -07:00
fix: ⚡ immediately fail jobs with invalid signature
This commit is contained in:
parent
4c57a5ffaa
commit
f99e8b3726
1 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,11 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
|
|||
info["@context"] = undefined;
|
||||
logger.debug(JSON.stringify(info, null, 2));
|
||||
|
||||
if (!signature?.keyId) return `Invalid signature: ${signature}`;
|
||||
|
||||
if (!signature?.keyId) {
|
||||
const err = `Invalid signature: ${signature}`;
|
||||
job.moveToFailed({message: err});
|
||||
return err;
|
||||
}
|
||||
//#endregion
|
||||
const host = toPuny(new URL(signature.keyId).hostname);
|
||||
|
||||
|
|
Loading…
Reference in a new issue