You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a string value from stdin the keystore add command
currently looks directly at stdin. However, stdin may also be consumed
while reading the keystore password. This commit changes the add command
to use the reader from the termainl instead of looking at stdin
directly.
closeselastic#98115
Copy file name to clipboardExpand all lines: distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/AddStringKeyStoreCommand.java
+2-7
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,12 @@
19
19
importorg.elasticsearch.core.CheckedFunction;
20
20
importorg.elasticsearch.env.Environment;
21
21
22
-
importjava.io.BufferedReader;
23
22
importjava.io.CharArrayWriter;
24
23
importjava.io.Closeable;
25
24
importjava.io.IOException;
26
25
importjava.io.InputStream;
27
26
importjava.io.InputStreamReader;
27
+
importjava.io.Reader;
28
28
importjava.nio.charset.StandardCharsets;
29
29
importjava.util.Arrays;
30
30
importjava.util.List;
@@ -47,11 +47,6 @@ class AddStringKeyStoreCommand extends BaseKeyStoreCommand {
Copy file name to clipboardExpand all lines: distribution/tools/keystore-cli/src/test/java/org/elasticsearch/cli/keystore/AddStringKeyStoreCommandTests.java
0 commit comments