summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_security.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/cpp_api/s_security.h')
-rw-r--r--src/script/cpp_api/s_security.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_security.h b/src/script/cpp_api/s_security.h
index c31aff26b..73e763548 100644
--- a/src/script/cpp_api/s_security.h
+++ b/src/script/cpp_api/s_security.h
@@ -50,6 +50,8 @@ public:
void initializeSecurityClient();
// Checks if the Lua state has been secured
static bool isSecure(lua_State *L);
+ // Loads a string as Lua code safely (doesn't allow bytecode).
+ static bool safeLoadString(lua_State *L, const std::string &code, const char *chunk_name);
// Loads a file as Lua code safely (doesn't allow bytecode).
static bool safeLoadFile(lua_State *L, const char *path, const char *display_name = NULL);
// Checks if mods are allowed to read (and optionally write) to the path