New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #9556 - Better prompt for input on Password #9557
Conversation
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A niggle about the language used in the help page, but other than that it is OK
System.err.printf(" %s myusername%n", Password.class.getName()); | ||
System.err.printf(" username only, will prompt for entries%n"); | ||
System.err.printf(" %s myusername ?%n", Password.class.getName()); | ||
System.err.printf(" username with question mark password, will prompt for entries%n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.err.printf(" username with question mark password, will prompt for entries%n"); | |
System.err.printf(" username with question mark password, will prompt for arguments%n"); |
System.err.printf(" %s myusername secretpassword%n", Password.class.getName()); | ||
System.err.printf(" username with password, will produce obfuscation results%n"); | ||
System.err.printf(" %s --prompt%n", Password.class.getName()); | ||
System.err.printf(" will prompt for entries%n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.err.printf(" will prompt for entries%n"); | |
System.err.printf(" will prompt for arguments%n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the help text should be consistent. If the first line is [<user>] <password>
then those terms should be used throughout.
System.err.printf("Argument options:%n"); | ||
System.err.printf(" %s%n", Password.class.getName()); | ||
System.err.printf(" No arguments, will show this help%n"); | ||
System.err.printf(" %s myusername%n", Password.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.err.printf(" %s myusername%n", Password.class.getName()); | |
System.err.printf(" %s user%n", Password.class.getName()); |
System.err.printf(" No arguments, will show this help%n"); | ||
System.err.printf(" %s myusername%n", Password.class.getName()); | ||
System.err.printf(" username only, will prompt for entries%n"); | ||
System.err.printf(" %s myusername ?%n", Password.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.err.printf(" %s myusername ?%n", Password.class.getName()); | |
System.err.printf(" %s user ?%n", Password.class.getName()); |
System.err.printf(" username only, will prompt for entries%n"); | ||
System.err.printf(" %s myusername ?%n", Password.class.getName()); | ||
System.err.printf(" username with question mark password, will prompt for entries%n"); | ||
System.err.printf(" %s myusername secretpassword%n", Password.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.err.printf(" %s myusername secretpassword%n", Password.class.getName()); | |
System.err.printf(" %s user password%n", Password.class.getName()); |
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Fixes how we prompt user for inputs on the
org.eclipse.jetty.util.security.Password
command line tool.This PR (initially) shows the following results ...
Usage text
Specifically asking for input prompts
Username provided, no password, prompt user
Prompt for input, no username provided, output doesn't contain CRYPT
Username and password provided as arguments, no prompt for input