# HG changeset patch # User Kim Alvefur # Date 1483387436 -3600 # Node ID a2625a36c092b484861f6f54374f5a6d6e6e14db # Parent 0b3c7b03cb90948e10e7587381553f6654bdd581 mod_storage_appendmap: Fix pattern meant to match valid Lua Names so such are escaped correctly diff -r 0b3c7b03cb90 -r a2625a36c092 mod_storage_appendmap/mod_storage_appendmap.lua --- a/mod_storage_appendmap/mod_storage_appendmap.lua Mon Jan 02 20:10:37 2017 +0100 +++ b/mod_storage_appendmap/mod_storage_appendmap.lua Mon Jan 02 21:03:56 2017 +0100 @@ -36,7 +36,7 @@ end for key, value in pairs(keyvalues) do module:log("debug", "user %s sets %q to %s", user, key, tostring(value)) - if type(key) ~= "string" or not key:find("^[%w_][%w%d_]*$") or key == "_ENV" then + if type(key) ~= "string" or not key:find("^[%a_][%w_]*$") or key == "_ENV" then key = "_ENV[" .. dump(key) .. "]"; end table.insert(keys, key);