fix: check for blank password / client secret
closes: #30540 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
9247029ca3
commit
d5041816b6
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue