0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 05:58:56 +02: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);
}
if(likely(opts.phase[phase::VERIFY]) && unlikely(!verify(event)))
throw m::BAD_SIGNATURE
if(likely(opts.phase[phase::VERIFY]))
{
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))
{
const scope_restore eval_phase