KEYCLOAK-9838 Trim username in admin welcome page

This commit is contained in:
stianst 2019-03-15 13:38:40 +01:00 committed by Stian Thorgersen
parent 3cc405b1c5
commit 8d42c9193b

View file

@ -119,6 +119,10 @@ public class WelcomeResource {
String password = formData.getFirst("password");
String passwordConfirmation = formData.getFirst("passwordConfirmation");
if (username != null) {
username = username.trim();
}
if (username == null || username.length() == 0) {
return createWelcomePage(null, "Username is missing");
}