Software /
code /
prosody
Changeset
3557:58ab7e61d220
mod_console: Keep global variable assignments sandboxed by default.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 04 Nov 2010 18:44:57 +0500 |
parents | 3556:d00fc909296e |
children | 3558:f1201ff060b7 |
files | plugins/mod_console.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_console.lua Thu Nov 04 08:42:18 2010 +0000 +++ b/plugins/mod_console.lua Thu Nov 04 18:44:57 2010 +0500 @@ -27,7 +27,7 @@ prosody.console = { commands = commands, env = def_env }; local function redirect_output(_G, session) - local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end, __newindex = function (t, k, v) rawset(_G, k, v); end }); + local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end }); env.dofile = function(name) local f, err = loadfile(name); if not f then return f, err; end