[
https://issues.jboss.org/browse/WFLY-8200?page=com.atlassian.jira.plugin....
]
Martin Choma updated WFLY-8200:
-------------------------------
Description:
If I fill --type option with some invalid value (other then KeyStoreCredentialStore) I get
NPE. For example with -t DoesNotExists I get
{code}
[mchoma@localhost bin]$ java -jar wildfly-elytron-tool.jar credential-store --add myalias
--secret supersecretpassword --location="/tmp/test.store" --uri
"cr-store://test?modifiable=true;create=true;keyStoreType=JCEKS" --password
mycspassword --salt 12345678 --iteration 230 --summary -t DoesNotExists
Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.<init>(Matcher.java:229)
at java.util.regex.Pattern.matcher(Pattern.java:1093)
at java.util.Formatter.parse(Formatter.java:2547)
at java.util.Formatter.format(Formatter.java:2501)
at java.io.PrintStream.format(PrintStream.java:970)
at java.io.PrintStream.printf(PrintStream.java:871)
at org.wildfly.security.tool.ElytronTool.main(ElytronTool.java:58)
{code}
was:
If I fill {{-t,--type arg Credential store type}} with some invalid value (other
then KeyStoreCredentialStore) I get NPE. For example with -t DoesNotExists I get
{code}
[mchoma@localhost bin]$ java -jar wildfly-elytron-tool.jar credential-store --add myalias
--secret supersecretpassword --location="/tmp/test.store" --uri
"cr-store://test?modifiable=true;create=true;keyStoreType=JCEKS" --password
mycspassword --salt 12345678 --iteration 230 --summary -t DoesNotExists
Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.<init>(Matcher.java:229)
at java.util.regex.Pattern.matcher(Pattern.java:1093)
at java.util.Formatter.parse(Formatter.java:2547)
at java.util.Formatter.format(Formatter.java:2501)
at java.io.PrintStream.format(PrintStream.java:970)
at java.io.PrintStream.printf(PrintStream.java:871)
at org.wildfly.security.tool.ElytronTool.main(ElytronTool.java:58)
{code}
CS tool, invalid content of --type parameter leads to NPE
---------------------------------------------------------
Key: WFLY-8200
URL:
https://issues.jboss.org/browse/WFLY-8200
Project: WildFly
Issue Type: Bug
Components: Security
Reporter: Martin Choma
Assignee: Darran Lofthouse
Priority: Critical
If I fill --type option with some invalid value (other then KeyStoreCredentialStore) I
get NPE. For example with -t DoesNotExists I get
{code}
[mchoma@localhost bin]$ java -jar wildfly-elytron-tool.jar credential-store --add myalias
--secret supersecretpassword --location="/tmp/test.store" --uri
"cr-store://test?modifiable=true;create=true;keyStoreType=JCEKS" --password
mycspassword --salt 12345678 --iteration 230 --summary -t DoesNotExists
Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.<init>(Matcher.java:229)
at java.util.regex.Pattern.matcher(Pattern.java:1093)
at java.util.Formatter.parse(Formatter.java:2547)
at java.util.Formatter.format(Formatter.java:2501)
at java.io.PrintStream.format(PrintStream.java:970)
at java.io.PrintStream.printf(PrintStream.java:871)
at org.wildfly.security.tool.ElytronTool.main(ElytronTool.java:58)
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)