Backport another bugfix (hopefully)
This commit is contained in:
parent
98d3e309ce
commit
2f6bc4ff22
|
@ -80,6 +80,8 @@ if it determines they are necessary for your server:
|
|||
|
||||
- Blocking newlines in chat messages (MT < 5.0.1).
|
||||
- Prevent saying `%2` in chat from crashing the server (MT == 5.1.0).
|
||||
- Prevent hacked clients from being able to access the inventories of other
|
||||
players (MT < 5.4.0).
|
||||
|
||||
If you do not want this for whatever reason (although I do not recommend it),
|
||||
you can disable these backports by adding `cloaking.backport_bugfixes = false`
|
||||
|
|
12
init.lua
12
init.lua
|
@ -1,7 +1,7 @@
|
|||
--
|
||||
-- Minetest player cloaking mod
|
||||
--
|
||||
-- © 2019 by luk3yx
|
||||
-- © 2020 by luk3yx
|
||||
--
|
||||
local path = minetest.get_modpath('cloaking')
|
||||
dofile(path .. '/core.lua')
|
||||
|
@ -71,3 +71,13 @@ if minetest.format_chat_message then
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Backport https://github.com/minetest/minetest/pull/10341
|
||||
-- TODO: Only apply this workaround on vulnerable MT versions.
|
||||
minetest.register_allow_player_inventory_action(function(player, action, inv)
|
||||
local inv_location = inv:get_location()
|
||||
if inv_location.type == 'player' and
|
||||
inv_location.name ~= player:get_player_name() then
|
||||
return 0
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue