Changeset

2430:a2625a36c092

mod_storage_appendmap: Fix pattern meant to match valid Lua Names so such are escaped correctly
author Kim Alvefur <zash@zash.se>
date Mon, 02 Jan 2017 21:03:56 +0100
parents 2429:0b3c7b03cb90
children 2431:623e23190c3e
files mod_storage_appendmap/mod_storage_appendmap.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);