From 15221ec79de21fe9d272460a60550f8c660cb4b3 Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 14 Aug 2014 07:17:47 +0100 Subject: [PATCH] Restrict some network info to plugins --- client/src/app.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/client/src/app.js b/client/src/app.js index 31a0f65..e7d643d 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -135,13 +135,22 @@ _kiwi.global = { }); // Add the networks getters/setters - obj.get = function() { - var network = getNetwork(); + obj.get = function(name) { + var network, restricted_keys; + + network = getNetwork(); if (!network) { return; } - return network.get.apply(network, arguments); + restricted_keys = [ + 'password' + ]; + if (restricted_keys.indexOf(name) > -1) { + return undefined; + } + + return network.get(name); }; obj.set = function() { -- 2.25.1