Handle empty arguments when computing the OAuth base string
This commit is contained in:
parent
0d35a10a50
commit
d9d8d5a106
1 changed files with 3 additions and 1 deletions
4
vendor/assets/ohauth/ohauth.js
vendored
4
vendor/assets/ohauth/ohauth.js
vendored
|
@ -16,7 +16,9 @@ ohauth.qsString = function(obj) {
|
|||
};
|
||||
|
||||
ohauth.stringQs = function(str) {
|
||||
return str.split('&').reduce(function(obj, pair){
|
||||
return str.split('&').filter(function (pair) {
|
||||
return pair !== '';
|
||||
}).reduce(function(obj, pair){
|
||||
var parts = pair.split('=');
|
||||
obj[decodeURIComponent(parts[0])] = (null === parts[1]) ?
|
||||
'' : decodeURIComponent(parts[1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue