diff --git a/core/src/main/java/org/keycloak/util/UriUtils.java b/core/src/main/java/org/keycloak/util/UriUtils.java index f9687a5515..775729adb8 100755 --- a/core/src/main/java/org/keycloak/util/UriUtils.java +++ b/core/src/main/java/org/keycloak/util/UriUtils.java @@ -18,7 +18,8 @@ public class UriUtils { public static String getOrigin(String uri) { String u = uri.toString(); - return u.substring(0, u.indexOf('/', 8)); + int e = u.indexOf('/', 8); + return e != -1 ? u.substring(0, u.indexOf('/', 8)) : u; } public static boolean isOrigin(String url) { diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html index aa3d9baa53..ebfca94936 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html @@ -178,12 +178,11 @@
${message.summary}
+ <#if client?? && client.baseUrl?has_content> + + #if>