forked from shadowfacts/shadowfacts.net
Fix another error that could occur when an actor doesn't have a public key
This commit is contained in:
parent
bd24f4e480
commit
b8346c7a19
|
@ -8,7 +8,7 @@ export = async (req: Request, res: Response, next: NextFunction) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const actor = await getActor(req.body.actor as string);
|
const actor = await getActor(req.body.actor as string);
|
||||||
if (actor && validate(req, actor.publicKey.publicKeyPem)) {
|
if (actor && actor.publicKey && validate(req, actor.publicKey.publicKeyPem)) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
// if the first check fails, force re-fetch the actor and try again
|
// if the first check fails, force re-fetch the actor and try again
|
||||||
|
|
Loading…
Reference in New Issue