fix: FFI library access from non-built-in scripts vulnerability

This commit is contained in:
MihailRis 2026-02-26 00:12:19 +03:00
parent ac02bc0c8e
commit 235a98afa4

View file

@ -192,5 +192,10 @@ State* lua::create_state(const EnginePaths& paths, StateType stateType) {
}
pop(L);
}
if (stateType == StateType::GENERATOR) {
pushnil(L);
setglobal(L, "ffi");
}
return L;
}