From: Darren Date: Thu, 14 Aug 2014 06:17:47 +0000 (+0100) Subject: Restrict some network info to plugins X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=15221ec79de21fe9d272460a60550f8c660cb4b3;p=KiwiIRC.git Restrict some network info to plugins --- 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() {