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)) {
|
if (!clientSecret.equals(confirmClientSecret)) {
|
||||||
throw new PropertyException("Client secrets do not match");
|
throw new PropertyException("Client secrets do not match");
|
||||||
}
|
}
|
||||||
|
if (clientSecret.isBlank()) {
|
||||||
|
throw new PropertyException("Client secret must not be blank");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
clientSecret = getFromEnv(clientSecretEnv);
|
clientSecret = getFromEnv(clientSecretEnv);
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,9 @@ public class BootstrapAdminUser extends AbstractNonServerCommand {
|
||||||
if (!password.equals(confirmPassword)) {
|
if (!password.equals(confirmPassword)) {
|
||||||
throw new PropertyException("Passwords do not match");
|
throw new PropertyException("Passwords do not match");
|
||||||
}
|
}
|
||||||
|
if (password.isBlank()) {
|
||||||
|
throw new PropertyException("Password must not be blank");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
password = getFromEnv(passwordEnv);
|
password = getFromEnv(passwordEnv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue