fix: check for blank password / client secret

closes: #30540

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steve Hawkins 2024-07-09 15:57:15 -04:00 committed by Peter Zaoral
parent 9247029ca3
commit d5041816b6
2 changed files with 6 additions and 0 deletions

View file

@ -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);
}

View file

@ -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);
}