From c8b2c8ee4fab0123938b844b77d4db635345907b Mon Sep 17 00:00:00 2001 From: Cyclonecode Date: Fri, 12 Jul 2019 16:58:49 +0200 Subject: [PATCH] Remove empty keys --- oauth-1.0a.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oauth-1.0a.js b/oauth-1.0a.js index 5c15dd4..ce6aee4 100644 --- a/oauth-1.0a.js +++ b/oauth-1.0a.js @@ -148,6 +148,11 @@ OAuth.prototype.getParameterString = function(request, oauth_data) { for(var i = 0; i < base_string_data.length; i++) { var key = base_string_data[i].key; var value = base_string_data[i].value; + + // skip empty keys + if (key === '') { + continue; + } // check if the value is an array // this means that this key has multiple values if (value && Array.isArray(value)){