Permalink
Browse files

Fixing global leaks on "name"

  • Loading branch information...
risseraka committed Mar 4, 2013
1 parent 4c3ec5b commit 28d975f16a03e6a29aea034182f6fba4fb5c8263
Showing with 2 additions and 0 deletions.
  1. +2 −0 index.js
View
@@ -29,6 +29,7 @@ function JsonRPCServer() {
JsonRPCServer.prototype.desc = function (service, params, returns) {
this.trace('***', 'describe: ' + service);
+ var name;
for (name in params) {
if ('string' == typeof(params[name])) {
params[name] = { type: params[name] };
@@ -152,6 +153,7 @@ JsonRPCServer.prototype.handleNonPOST = function(req, res) {
services: {}
};
+ var name;
for (name in JsonRPCServer.functions) {
SMD.services[name] = {
envelope: "JSON-RPC-2.0",

0 comments on commit 28d975f

Please sign in to comment.