mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +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);
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue