projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_s2s: Fire s2s-check-certificate event after validating a certificate, to allow...
[prosody.git]
/
plugins
/
storage
/
sqlbasic.lib.lua
diff --git
a/plugins/storage/sqlbasic.lib.lua
b/plugins/storage/sqlbasic.lib.lua
index f12022876a6396a342a63eeea825311e523360cc..ab3648f9375006c31c9d9c4dd3317531a83a7687 100644
(file)
--- 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;
-- 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 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
if not f then return nil; end
- setfenv(f, {});
local s, d = pcall(f);
if not s then return nil; end
return d;
local s, d = pcall(f);
if not s then return nil; end
return d;