#include "cpp_api/s_security.h"
#include "lua_api/l_base.h"
#include "filesys.h"
#include "porting.h"
#include "server.h"
#include "settings.h"
#include <cerrno>
#include <string>
#include <algorithm>
#include <iostream>
Macros | |
#define | SECURE_API(lib, name) |
Functions | |
static void | copy_safe (lua_State *L, const char *list[], unsigned len, int from=-2, int to=-1) |
static void | shallow_copy_table (lua_State *L, int from=-2, int to=-1) |
static void | push_original (lua_State *L, const char *lib, const char *func) |
bool | checkModNameWhitelisted (const std::string &mod_name, const std::string &setting) |
#define SECURE_API | ( | lib, | |
name ) |
Referenced by ScriptApiSecurity::initializeSecurity(), and ScriptApiSecurity::initializeSecurityClient().
bool checkModNameWhitelisted | ( | const std::string & | mod_name, |
const std::string & | setting ) |
References CONTAINS, g_settings, Settings::get(), str_split(), and str_starts_with().
Referenced by ScriptApiSecurity::checkPath(), and ScriptApiSecurity::checkWhitelisted().
|
inlinestatic |
Referenced by ScriptApiSecurity::initializeSecurity(), and ScriptApiSecurity::initializeSecurityClient().
|
inlinestatic |
References CUSTOM_RIDX_GLOBALS_BACKUP.
Referenced by ScriptApiSecurity::sl_io_input(), ScriptApiSecurity::sl_io_lines(), ScriptApiSecurity::sl_io_open(), ScriptApiSecurity::sl_io_output(), ScriptApiSecurity::sl_os_remove(), ScriptApiSecurity::sl_os_rename(), and ScriptApiSecurity::sl_os_setlocale().
|
static |