summaryrefslogtreecommitdiff
path: root/mesecons_luacontroller
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2017-01-15 20:11:12 +0100
committerJeija <norrepli@gmail.com>2017-01-15 20:11:12 +0100
commit54daee236e680fa79b2dd31e812f7e063887a0bf (patch)
treeb0c66d203e6842ef8e894f7b377b56cee0e9aa97 /mesecons_luacontroller
parentc2e3d7c4e58b2563e79aead60c6efedf27c786cf (diff)
downloadmesecons-54daee236e680fa79b2dd31e812f7e063887a0bf.tar
mesecons-54daee236e680fa79b2dd31e812f7e063887a0bf.tar.gz
mesecons-54daee236e680fa79b2dd31e812f7e063887a0bf.tar.bz2
mesecons-54daee236e680fa79b2dd31e812f7e063887a0bf.tar.xz
mesecons-54daee236e680fa79b2dd31e812f7e063887a0bf.zip
Luacontroller: Revert function stripping from digiline messages
Diffstat (limited to 'mesecons_luacontroller')
-rw-r--r--mesecons_luacontroller/init.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 3c34887..d874fdf 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -278,9 +278,11 @@ local function get_digiline_send(pos)
return false
end
- -- No sending functions over the wire and make sure serialized version
- -- of the data is not insanely long to prevent DoS-like attacks
- msg = mesecon.tablecopy_stripfunctions(msg)
+ -- It is technically possible to send functions over the wire since
+ -- the high performance impact of stripping those from the data has
+ -- been decided to not be worth the added realism.
+ -- Make sure serialized version of the data is not insanely long to
+ -- prevent DoS-like attacks
local msg_ser = minetest.serialize(msg)
if #msg_ser > mesecon.setting("luacontroller_digiline_maxlen", 50000) then
return false