Permalink
Browse files

Merge pull request #7 from risseraka/fix-global-leak

[RFR] Fixing global leaks on "name"
  • Loading branch information...
2 parents 4c3ec5b + 28d975f commit a1103c2912d6af2e7e429f8789818f174c18407c @arlo arlo committed Mar 5, 2013
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 a1103c2

Please sign in to comment.