From 89f79727bea28177b92fb0b673650b98cf96b4ca Mon Sep 17 00:00:00 2001 From: Jose Ignacio Andres Date: Tue, 9 Jul 2013 00:38:18 +0200 Subject: [PATCH] prevent inherited properties using hasOwnProperty --- lib/oauth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/oauth.js b/lib/oauth.js index 7607ee61..44dcf7f8 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -133,6 +133,7 @@ exports.OAuth.prototype._buildAuthorizationHeaders= function(orderedParameters) exports.OAuth.prototype._makeArrayOfArgumentsHash= function(argumentsHash) { var argument_pairs= []; for(var key in argumentsHash ) { + if (argumentsHash.hasOwnProperty(key)) { var value= argumentsHash[key]; if( Array.isArray(value) ) { for(var i=0;i