fix use of incorrect key format in admin-rpc
parent
86b9cc2de1
commit
7f22da0f57
|
@ -2,7 +2,7 @@
|
|||
const BatchRead = require("../batch-read");
|
||||
const nThen = require("nthen");
|
||||
const getFolderSize = require("get-folder-size");
|
||||
const Util = require("../common-util");
|
||||
//const Util = require("../common-util");
|
||||
|
||||
var Fs = require("fs");
|
||||
|
||||
|
@ -94,8 +94,8 @@ var getDiskUsage = function (Env, cb) {
|
|||
|
||||
Admin.command = function (Env, safeKey, data, cb, Server) {
|
||||
var admins = Env.admins;
|
||||
var unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
||||
if (admins.indexOf(unsafeKey) === -1) {
|
||||
//var unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
||||
if (admins.indexOf(safeKey) === -1) {
|
||||
return void cb("FORBIDDEN");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue