Create a filesystem abstraction layer for CSM and only allow accessing files that...
authorred-001 <red-001@outlook.ie>
Fri, 30 Jun 2017 18:14:39 +0000 (19:14 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Fri, 30 Jun 2017 18:14:39 +0000 (20:14 +0200)
commitf3ad75691aea30d2d68aab19fbfa9031409c39d7
treeb73109f1d3d14af91b3593dc80645a1bb70274a8
parent2e53801fc0d9ba13afec6c1ddb5e3999f68b96bd
Create a filesystem abstraction layer for CSM and only allow accessing files that are scanned into it. (#5965)

* Load client-side mods into memory before executing them.

This removes the remaining filesystem access that client-sided mods had and it will hopefully make then more secure.

* Lua Virtual filesystem: don't load the files into memory just scan the filenames into memory.

* Fix the issues with backtrace

* fix most of the issues

* fix code style.

* add a comment
24 files changed:
builtin/client/init.lua
builtin/game/init.lua
builtin/init.lua
builtin/mainmenu/dlg_settings_advanced.lua
builtin/mainmenu/init.lua
builtin/profiler/init.lua
clientmods/preview/example.lua [new file with mode: 0644]
clientmods/preview/examples/first.lua [new file with mode: 0644]
clientmods/preview/init.lua
src/client.cpp
src/client.h
src/game.cpp
src/script/common/c_internal.cpp
src/script/common/c_internal.h
src/script/cpp_api/s_base.cpp
src/script/cpp_api/s_base.h
src/script/cpp_api/s_security.cpp
src/script/cpp_api/s_security.h
src/script/lua_api/l_client.cpp
src/script/lua_api/l_client.h
src/script/lua_api/l_util.cpp
src/script/scripting_client.cpp
src/script/scripting_mainmenu.cpp
src/script/scripting_server.cpp