[java-identity-provider] branch maint-4 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:35:36 UTC 2022


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch maint-4
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=3b9db6b608d56031e8215a03985fa4ce9b8678db

The following commit(s) were added to refs/heads/maint-4 by this push:
     new 3b9db6b60 IDP-2009 Plugin Installer does not  fail gracefully if no certificate is installed piped input provided
3b9db6b60 is described below

commit 3b9db6b608d56031e8215a03985fa4ce9b8678db
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 a51cf5778..3222b07a0 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