[jboss-jira] [JBoss JIRA] (AS7-2043) CLI usability: prompting for password reveals password length

Radoslav Husar (Commented) (JIRA) jira-events at lists.jboss.org
Tue Oct 11 03:48:18 EDT 2011


    [ https://issues.jboss.org/browse/AS7-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633719#comment-12633719 ] 

Radoslav Husar commented on AS7-2043:
-------------------------------------

So let me dump my patch for this, but can you also apply this conflicting logging one fixing the missing spacing:

{code}
--- a/cli/src/main/java/org/jboss/as/cli/CommandLineMain.java
+++ b/cli/src/main/java/org/jboss/as/cli/CommandLineMain.java
@@ -982,13 +982,13 @@ public class CommandLineMain {
                     } else if (current instanceof NameCallback) {
                         NameCallback ncb = (NameCallback) current;
                         if (userName == null) {
-                            userName = console.readLine("Username:");
+                            userName = console.readLine("Username: ");
                         }
                         ncb.setName(userName);
                     } else if (current instanceof PasswordCallback) {
                         PasswordCallback pcb = (PasswordCallback) current;
                         if (password == null) {
-                            String temp = console.readLine("Password:", '*');
+                            String temp = console.readLine("Password: ", '*');
                             if (temp != null) {
                                 password = temp.toCharArray();
                             }
{code}
                
> CLI usability: prompting for password reveals password length
> -------------------------------------------------------------
>
>                 Key: AS7-2043
>                 URL: https://issues.jboss.org/browse/AS7-2043
>             Project: Application Server 7
>          Issue Type: Feature Request
>          Components: CLI, Scripts
>    Affects Versions: 7.0.2.Final
>            Reporter: Radoslav Husar
>            Assignee: Darran Lofthouse
>             Fix For: 7.1.0.Beta1
>
>
> Lets not reinvent the wheel and do what the standards do: prompting for password should not reveal password length. 
> For instance ssh does not reveal the password.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list