From 54daee236e680fa79b2dd31e812f7e063887a0bf Mon Sep 17 00:00:00 2001 From: Jeija Date: Sun, 15 Jan 2017 20:11:12 +0100 Subject: Luacontroller: Revert function stripping from digiline messages --- mesecons_luacontroller/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mesecons_luacontroller/init.lua') 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 -- cgit v1.2.3