This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 669e05ec971a648b209339d2c5fb0a3fb00ef2fe Author: Sebb <[email protected]> AuthorDate: Wed Jan 19 17:52:27 2022 +0000 escape is deprecated (#205) --- webui/js/oauth.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webui/js/oauth.js b/webui/js/oauth.js index 3721c15..616a673 100644 --- a/webui/js/oauth.js +++ b/webui/js/oauth.js @@ -52,15 +52,21 @@ function oauthPortal(key) { let state = parseInt(Math.random()*1000000000) + '' + parseInt(Math.random()*1000000000) // google is different (as usual) if (key == 'google') { - location.href = ot.oauth_portal + "?state=" + state + "&client_id=" + (ot.client_id ? ot.client_id : "") + "&response_type=id_token&scope=email&redirect_uri=" + escape(window.location) + location.href = ot.oauth_portal + + "?state=" + state + + "&client_id=" + encodeURIComponent(ot.client_id ? ot.client_id : "") + + "&response_type=id_token&scope=email&redirect_uri=" + encodeURIComponent(window.location) } else { let cid = "" if (ot.construct) { for (let k in ot) { - cid += "&" + k + "=" + escape(ot[k]) + cid += "&" + k + "=" + encodeURIComponent(ot[k]) } } - location.href = ot.oauth_portal + "?state=" + state + "&redirect_uri=" + escape(window.location + "?key=" + key + "&state=" + state) + cid + location.href = ot.oauth_portal + + "?state=" + state + + "&redirect_uri=" + encodeURIComponent(window.location + "?key=" + key + "&state=" + state) + + cid } }
