From 10161fb41b22286008c91507d7f0b0c7ee453537 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 27 Apr 2013 12:20:16 +0100 Subject: [PATCH] Encode parameters correctly when building an OAuth base string Parameter key and value escaping needs to use the extended algorithm from the OAuth specification, not the standard URI escaping algorithm so we need to escape !, ', *, ( and ) characters. --- vendor/assets/ohauth/ohauth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/assets/ohauth/ohauth.js b/vendor/assets/ohauth/ohauth.js index 0497da87c..419fb2a1a 100644 --- a/vendor/assets/ohauth/ohauth.js +++ b/vendor/assets/ohauth/ohauth.js @@ -4,8 +4,8 @@ var ohauth = {}; ohauth.qsString = function(obj) { return Object.keys(obj).sort().map(function(key) { - return encodeURIComponent(key) + '=' + - encodeURIComponent(obj[key]); + return ohauth.percentEncode(key) + '=' + + ohauth.percentEncode(obj[key]); }).join('&'); }; -- 2.43.2