*validate pubkey length

This commit is contained in:
Derrick Hammer 2023-01-18 04:44:42 -05:00
parent 55c87e0895
commit ac84e39a6e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,11 @@ async function handleDiscover(aq: ActiveQuery) {
return; return;
} }
if (aq.callerInput.pubkey.length !== 32) {
aq.reject("pubkey must be 32 bytes");
return;
}
if ( if (
"options" in aq.callerInput && "options" in aq.callerInput &&
typeof aq.callerInput.options !== "object" typeof aq.callerInput.options !== "object"