From f050587a11cd1cce110c497ddb01618160d2957c Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 1 Sep 2013 11:38:34 +0200 Subject: [PATCH] fixed bug in input sanitization --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 9cfb4eb..99bbb59 100644 --- a/init.lua +++ b/init.lua @@ -21,9 +21,10 @@ along with this program. If not, see . --]] --- Version 1.1 +-- Version 1.15 -- Changelog: +-- 01.09.2013 * fixed bug in input sanitization -- 31.08.2013 * changed receipe for key to avoid crafting conflickt with screwdriver -- 10.07.2013 * removed a potential bug (now uses string:gmatch) -- * added shared locked furnaces @@ -320,7 +321,7 @@ function locks:lock_handle_input( pos, formname, fields, player ) end -- of /help -- sanitize player input - if( fields.locks_sent_lock_command:gmatch("[^%a%d%s_%- %/%:]")) then + if( fields.locks_sent_lock_command:match("[^%a%d%s_%- /%:]")) then minetest.chat_send_player(name, "Input contains unsupported characters. Allowed: a-z, A-Z, 0-9, _, -, :."); return; end