[java-identity-provider] branch main updated: IDP-2009 Plugin Installer does not fail gracefully if no certificate is installed piped input provided
Rod Widdowson
rdw at steadingsoftware.com
Fri Sep 23 14:36:20 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=ef7f38cd71266b5a49d20252bd2226307d1ca86d
The following commit(s) were added to refs/heads/main by this push:
new ef7f38cd7 IDP-2009 Plugin Installer does not fail gracefully if no certificate is installed piped input provided
ef7f38cd7 is described below
commit ef7f38cd71266b5a49d20252bd2226307d1ca86d
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Sep 23 15:29:38 2022 +0100
IDP-2009 Plugin Installer does not fail gracefully if no certificate is installed piped input provided
https://shibboleth.atlassian.net/browse/IDP-2009
Check for a real console and fail if there isn't one.
---
.../shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java
index f5d09c7a7..9fd740e77 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java
@@ -587,7 +587,7 @@ public final class PluginInstallerCLI extends AbstractIdPHomeAwareCommandLine<Pl
}
/** Predicate to ask the user if they want to install the trust store provided. */
- private static class InstallerQuery implements Predicate<String> {
+ private class InstallerQuery implements Predicate<String> {
/** What to say. */
@Nonnull
@@ -603,6 +603,10 @@ public final class PluginInstallerCLI extends AbstractIdPHomeAwareCommandLine<Pl
/** {@inheritDoc} */
public boolean test(final String keyString) {
+ if (System.console() == null) {
+ log.error("No Console Attached to installer");
+ return false;
+ }
System.console().printf("%s:\n%s [yN] ", promptText, keyString);
System.console().flush();
final String result = StringSupport.trimOrNull(System.console().readLine());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list