From c20ab4a9a6df08e5b6bf83988bc6c61058861cf1 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Thu, 26 Mar 2015 13:05:09 -0400 Subject: [PATCH] fix query parsing --- integration/js/src/main/resources/keycloak.js | 7 ++++++- .../java/org/keycloak/testsuite/account/AccountTest.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/integration/js/src/main/resources/keycloak.js b/integration/js/src/main/resources/keycloak.js index 9921e1b1ca..13b813bd43 100755 --- a/integration/js/src/main/resources/keycloak.js +++ b/integration/js/src/main/resources/keycloak.js @@ -567,7 +567,12 @@ var oauth = {}; oauth.newUrl = url.split('?')[0]; - var params = url.split('?')[1].split('&'); + var paramString = url.split('?')[1]; + var fragIndex = paramString.indexOf('#'); + if (fragIndex != -1) { + paramString = paramString.substring(0, fragIndex); + } + var params = paramString.split('&'); for (var i = 0; i < params.length; i++) { var p = params[i].split('='); switch (decodeURIComponent(p[0])) { diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java index c8371bdb5c..00b071e25c 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java @@ -157,7 +157,7 @@ public class AccountTest { }); } - //@Test @Ignore + @Test @Ignore public void runit() throws Exception { Thread.sleep(10000000); }