aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/storage
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2012-06-08 05:04:38 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2012-06-08 05:04:38 +0200
commit40ea2230d1d494c55d8a2b22e111c4bd29074974 (patch)
tree28c1bcbab960b28cc27f30e8ab0c04e30f11da2d /plugins/storage
parentad7ee8604f2811d3ca3e5adb5faa8c095f4d5999 (diff)
downloadprosody-40ea2230d1d494c55d8a2b22e111c4bd29074974.tar.gz
prosody-40ea2230d1d494c55d8a2b22e111c4bd29074974.zip
Eliminate direct setfenv usage
Diffstat (limited to 'plugins/storage')
-rw-r--r--plugins/storage/sqlbasic.lib.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/storage/sqlbasic.lib.lua b/plugins/storage/sqlbasic.lib.lua
index f1202287..ab3648f9 100644
--- a/plugins/storage/sqlbasic.lib.lua
+++ b/plugins/storage/sqlbasic.lib.lua
@@ -3,12 +3,12 @@
-- This driver stores data as simple key-values
local ser = require "util.serialization".serialize;
+local envload = require "util.envload".envload;
local deser = function(data)
module:log("debug", "deser: %s", tostring(data));
if not data then return nil; end
- local f = loadstring("return "..data);
+ local f = envload("return "..data, nil, {});
if not f then return nil; end
- setfenv(f, {});
local s, d = pcall(f);
if not s then return nil; end
return d;