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:
parent
d46b6bb27b
commit
c83f820e7f
1 changed files with 11 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue