Commit 43064326 authored by Tristan Cavelier's avatar Tristan Cavelier

improve security on storages

parent ffce55f4
...@@ -144,6 +144,9 @@ var storage = function(spec, my) { ...@@ -144,6 +144,9 @@ var storage = function(spec, my) {
return command (o, my); return command (o, my);
}; };
priv.storage = my.storage;
delete my.storage;
that.addJob = function (method,storage_spec,doc,option,success,error) { that.addJob = function (method,storage_spec,doc,option,success,error) {
var command_opt = { var command_opt = {
options: option, options: option,
...@@ -158,7 +161,7 @@ var storage = function(spec, my) { ...@@ -158,7 +161,7 @@ var storage = function(spec, my) {
} }
jobManager.addJob ( jobManager.addJob (
job({ job({
storage:my.storage(storage_spec||{}), storage:priv.storage(storage_spec||{}),
command:priv.newCommand(method,command_opt) command:priv.newCommand(method,command_opt)
}, my) }, my)
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment