1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-20 10:13:17 +00:00

Fixed bug where DNS Locking checked for exception instead of NULL

This commit is contained in:
Bryan Roe
2022-02-04 15:54:58 -08:00
parent 0d354c9c52
commit 87e58ae8ec

View File

@@ -4096,7 +4096,7 @@ void MeshServer_Connect(MeshAgentHostContainer *agent)
if (url != NULL)
{
duk_push_sprintf(agent->meshCoreCtx, "require('win-authenticode-opus').locked('%s');", url); // [obj][str]
if (duk_peval(agent->meshCoreCtx) == 0) // [obj][obj]
if (duk_peval(agent->meshCoreCtx) == 0 && !duk_is_null_or_undefined(agent->meshCoreCtx, -1)) // [obj][obj]
{
char *dns = Duktape_GetStringPropertyValue(agent->meshCoreCtx, -1, "dns", NULL);
char *id = Duktape_GetStringPropertyValue(agent->meshCoreCtx, -1, "id", NULL);