From 7ef747e7c46c2fe3d050f5b0f45567a2d01a7325 Mon Sep 17 00:00:00 2001 From: Dominique d'Argent Date: Mon, 9 Nov 2015 16:27:33 +0100 Subject: [PATCH] Fix parameter encoding in JS adapter - fixes https://issues.jboss.org/browse/KEYCLOAK-2047 - relates to keycloak/keycloak-js-bower#7 --- integration/js/src/main/resources/keycloak.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration/js/src/main/resources/keycloak.js b/integration/js/src/main/resources/keycloak.js index 7b378de347..09e0d86cfc 100755 --- a/integration/js/src/main/resources/keycloak.js +++ b/integration/js/src/main/resources/keycloak.js @@ -153,23 +153,23 @@ + '&response_type=code'; if (options && options.prompt) { - url += '&prompt=' + options.prompt; + url += '&prompt=' + encodeURIComponent(options.prompt); } if (options && options.loginHint) { - url += '&login_hint=' + options.loginHint; + url += '&login_hint=' + encodeURIComponent(options.loginHint); } if (options && options.idpHint) { - url += '&kc_idp_hint=' + options.idpHint; + url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint); } if (options && options.scope) { - url += '&scope=' + options.scope; + url += '&scope=' + encodeURIComponent(options.scope); } if (options && options.locale) { - url += '&ui_locales=' + options.locale; + url += '&ui_locales=' + encodeURIComponent(options.locale); } return url;