aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-11-04 18:44:57 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-11-04 18:44:57 +0500
commit56f793583c675061427c22dff8d349aae6d57901 (patch)
treeff76e2d0ed04bf0628f87156099dc886a24cc077 /plugins/mod_console.lua
parentfabbca99cfe5f3e153b8c6332d83890fa01aaa4a (diff)
downloadprosody-56f793583c675061427c22dff8d349aae6d57901.tar.gz
prosody-56f793583c675061427c22dff8d349aae6d57901.zip
mod_console: Keep global variable assignments sandboxed by default.
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index ba19c42e..46956a82 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -27,7 +27,7 @@ local default_env_mt = { __index = def_env };
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