mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
fix: ⚡ immediately fail jobs with invalid signature
This commit is contained in:
parent
4c57a5ffaa
commit
f99e8b3726
@ -35,8 +35,11 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
|
|||||||
info["@context"] = undefined;
|
info["@context"] = undefined;
|
||||||
logger.debug(JSON.stringify(info, null, 2));
|
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
|
//#endregion
|
||||||
const host = toPuny(new URL(signature.keyId).hostname);
|
const host = toPuny(new URL(signature.keyId).hostname);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user