0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:vm: Add missing phase indication during verify.

This commit is contained in:
Jason Volk 2020-05-12 00:13:24 -07:00
parent d46b6bb27b
commit c83f820e7f

View file

@ -602,12 +602,20 @@ ircd::m::vm::execute_pdu(eval &eval,
call_hook(access_hook, eval, event, eval); call_hook(access_hook, eval, event, eval);
} }
if(likely(opts.phase[phase::VERIFY]) && unlikely(!verify(event))) if(likely(opts.phase[phase::VERIFY]))
throw m::BAD_SIGNATURE {
const scope_restore eval_phase
{ {
"Signature verification failed." eval.phase, phase::VERIFY
}; };
if(unlikely(!verify(event)))
throw m::BAD_SIGNATURE
{
"Signature verification failed."
};
}
if(likely(opts.phase[phase::FETCH_AUTH] && opts.fetch)) if(likely(opts.phase[phase::FETCH_AUTH] && opts.fetch))
{ {
const scope_restore eval_phase const scope_restore eval_phase