Software /
code /
prosody-modules
Diff
mod_storage_appendmap/mod_storage_appendmap.lua @ 2205:98354fbea63c
mod_storage_appendmap: Prevent _ENV = false
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 09 Jun 2016 11:47:55 +0200 |
parent | 2062:8f7083b980cf |
child | 2430:a2625a36c092 |
line wrap: on
line diff
--- a/mod_storage_appendmap/mod_storage_appendmap.lua Thu Jun 09 11:46:45 2016 +0200 +++ b/mod_storage_appendmap/mod_storage_appendmap.lua Thu Jun 09 11:47:55 2016 +0200 @@ -32,7 +32,7 @@ function map:set_keys(user, keyvalues) local keys, values = {}, {}; if _VERSION == "Lua 5.1" then - assert(not keyvalues._ENV, "'_ENV' is a restricted key"); + assert(keyvalues._ENV == nil, "'_ENV' is a restricted key"); end for key, value in pairs(keyvalues) do module:log("debug", "user %s sets %q to %s", user, key, tostring(value))