Bug 1592407 - Port OAuth2 decoding fix from gData add-on. r=mkmelin a=jorgk DONTBUILD
authordlob <dlob@users.noreply.github.com>
Wed, 30 Oct 2019 22:08:39 +0100
changeset 32355 56b6d1b50647143c25efe642b37b02f65f9c4343
parent 32354 4f5c19b9a6b76266eb891548abc10f38d491bcf9
child 32356 66a30ae4e6fadef90a6dc5ae5ffc83c34613c1ee
push id226
push usermozilla@jorgk.com
push dateWed, 30 Oct 2019 23:05:31 +0000
treeherdercomm-esr60@56b6d1b50647 [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 DONTBUILD 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
@@ -11,17 +11,17 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 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) {