diff options
author | Agaran <agaran@pld-linux.org> | 2016-11-26 20:28:17 +0100 |
---|---|---|
committer | Diego MartÃnez <lkaezadl3@yahoo.com> | 2016-11-26 16:49:12 -0300 |
commit | 877e55078718047323ce2d5b07d004c05414aaf5 (patch) | |
tree | a764a74cf09323137e019979265208c2aef22b8b | |
parent | 33e3fcd15b48afae5fa409aea134385408ee2912 (diff) | |
download | xban2-877e55078718047323ce2d5b07d004c05414aaf5.tar.gz xban2-877e55078718047323ce2d5b07d004c05414aaf5.tar.bz2 xban2-877e55078718047323ce2d5b07d004c05414aaf5.zip |
Filter fields submission by privs.
-rw-r--r-- | gui.lua | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -100,6 +100,11 @@ end minetest.register_on_player_receive_fields(function(player, formname, fields) if formname ~= FORMNAME then return end local name = player:get_player_name() + if not minetest.check_player_privs(name, { ban=true }) then + minetest.log("warning", + "[xban2] Received fields from unauthorized user: "..name) + return + end local state = get_state(name) if fields.player then local t = minetest.explode_textlist_event(fields.player) |