Bug 1592407 - Port OAuth2 decoding fix from gData add-on. r=mkmelin a=jorgk THUNDERBIRD_71_0b2_BUILD2 THUNDERBIRD_71_0b2_RELEASE
authordlob <dlob@users.noreply.github.com>
Wed, 30 Oct 2019 22:08:39 +0100
changeset 36369 e4607a1592d21563c3daa8ea441519b63fb5ba62
parent 36368 9f4ffa0f05f869a5914f632abd69cf4a3d6acebc
child 36370 49fa640cbb30dc0ddc1c847189d810b75d5c1d58
push id2519
push usermozilla@jorgk.com
push dateWed, 30 Oct 2019 21:14:47 +0000
treeherdercomm-beta@e4607a1592d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, jorgk
bugs1592407
Bug 1592407 - Port OAuth2 decoding fix from gData add-on. r=mkmelin a=jorgk https://github.com/kewisch/gdata-provider/commit/29dc484b04640d609b26d2f5728b0221e9f05bb6 https://github.com/kewisch/gdata-provider/commit/216481167586897b5e0949617aca1ee482e5c105.patch
mailnews/base/util/OAuth2.jsm
--- a/mailnews/base/util/OAuth2.jsm
+++ b/mailnews/base/util/OAuth2.jsm
@@ -13,17 +13,17 @@ const { Log4Moz } = ChromeUtils.import("
 
 function parseURLData(aData) {
   let result = {};
   aData
     .split(/[?#]/, 2)[1]
     .split("&")
     .forEach(function(aParam) {
       let [key, value] = aParam.split("=");
-      result[key] = value;
+      result[key] = decodeURIComponent(value);
     });
   return result;
 }
 
 // Only allow one connecting window per endpoint.
 var gConnecting = {};
 
 function OAuth2(aBaseURI, aScope, aAppKey, aAppSecret) {