mirror of
https://github.com/keycloak/keycloak.git
synced 2026-02-22 15:19:23 -06:00
fix: check for blank password / client secret
closes: #30540 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
committed by
Peter Zaoral
parent
9247029ca3
commit
d5041816b6
@@ -78,6 +78,9 @@ public class BootstrapAdminService extends AbstractNonServerCommand {
|
||||
if (!clientSecret.equals(confirmClientSecret)) {
|
||||
throw new PropertyException("Client secrets do not match");
|
||||
}
|
||||
if (clientSecret.isBlank()) {
|
||||
throw new PropertyException("Client secret must not be blank");
|
||||
}
|
||||
} else {
|
||||
clientSecret = getFromEnv(clientSecretEnv);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,9 @@ public class BootstrapAdminUser extends AbstractNonServerCommand {
|
||||
if (!password.equals(confirmPassword)) {
|
||||
throw new PropertyException("Passwords do not match");
|
||||
}
|
||||
if (password.isBlank()) {
|
||||
throw new PropertyException("Password must not be blank");
|
||||
}
|
||||
} else {
|
||||
password = getFromEnv(passwordEnv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user