more strict comparison.

This commit is contained in:
Yohei Sasaki 2010-10-17 15:53:29 +09:00 committed by ciaranj
parent 6c27fa9ead
commit fedf5776e7
1 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,8 @@ exports.OAuth.prototype._buildAuthorizationHeaders= function(orderedParameters)
for( var i= 0 ; i < orderedParameters.length; i++) {
// Whilst the all the parameters should be included within the signature, only the oauth_ arguments
// should appear within the authorization header.
if( orderedParameters[i][0].match('^oauth_') == "oauth_") {
var m = orderedParameters[i][0].match('^oauth_');
if( m && m[0] === "oauth_") {
authHeader+= this._encodeData(orderedParameters[i][0])+"=\""+ this._encodeData(orderedParameters[i][1])+"\",";
}
}