Restrict some network info to plugins
authorDarren <darren@darrenwhitlen.com>
Thu, 14 Aug 2014 06:17:47 +0000 (07:17 +0100)
committerDarren <darren@darrenwhitlen.com>
Thu, 14 Aug 2014 06:17:47 +0000 (07:17 +0100)
client/src/app.js

index 31a0f65369c9b91cbbf23a108be054eb37b0dd79..e7d643d626c28f6ac4e901e4d4070a9ce52ddf09 100644 (file)
@@ -135,13 +135,22 @@ _kiwi.global = {
             });\r
 \r
             // Add the networks getters/setters\r
-            obj.get = function() {\r
-                var network = getNetwork();\r
+            obj.get = function(name) {\r
+                var network, restricted_keys;\r
+\r
+                network = getNetwork();\r
                 if (!network) {\r
                     return;\r
                 }\r
 \r
-                return network.get.apply(network, arguments);\r
+                restricted_keys = [\r
+                    'password'\r
+                ];\r
+                if (restricted_keys.indexOf(name) > -1) {\r
+                    return undefined;\r
+                }\r
+\r
+                return network.get(name);\r
             };\r
 \r
             obj.set = function() {\r