projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d35a10
)
Handle empty arguments when computing the OAuth base string
author
Tom Hughes
<tom@compton.nu>
Mon, 29 Apr 2013 09:49:19 +0000
(10:49 +0100)
committer
Tom Hughes
<tom@compton.nu>
Mon, 29 Apr 2013 09:49:19 +0000
(10:49 +0100)
vendor/assets/ohauth/ohauth.js
patch
|
blob
|
history
diff --git
a/vendor/assets/ohauth/ohauth.js
b/vendor/assets/ohauth/ohauth.js
index 210e859e4c57b0ce3412f3aba5dcfaa7b41afb61..73eb8b9eeec5756c63ce6701c7a893fbaab95d04 100644
(file)
--- a/
vendor/assets/ohauth/ohauth.js
+++ b/
vendor/assets/ohauth/ohauth.js
@@
-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]);