Uploaded image for project: 'Maven GPG Plugin'
  1. Maven GPG Plugin
  2. MGPG-41

Passphrase revealed when backspacing at prompt

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.5
    • None

    Description

      At the "GPG Passphrase" prompt, if I hit the backspace key during the entry, the passphrase is printed in cleartext with one less character. For example:

      GPG Passphrase: ******************^R
      mysecretpasswor*^R
      mysecretpasswo*^R
      mysecretpassw*^R
      mysecretpass*^R
      mysecretpas*^R
      mysecretpa*^R
      mysecretp*^R
      mysecret*^R
      mysecre*^R
      mysecr*^R
      mysec*^R
      myse*^R
      mys*^R
      my*^R
      m*^R
      *^R
      *

      This can be fixed by replacing the MaskingThread with Java 6's built-in password prompt (as the code comment had suggested to do):

      Console console = System.console();
      if ( console != null )
      {
          pass = new String( console.readPassword( "GPG Passphrase:  " ) );
      }

      Attachments

        Activity

          People

            stephenconnolly stephenconnolly
            tony19 Tony Trinh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: