Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8194750

Console.readPassword does not save/restore tty settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • None
    • core-libs
    • None
    • b10

      After calling "System.console().readPassword()", my tty echo setting is unconditionally turned on (sorry, I like "stty -echo").
      Of course, java should save and restore the tty settings (see e.g. stty -g)

      Linux demo:

       $ stty -echo
       $ echo ---; stty | grep echo; echo ---; jver 11 keytool -list -cacerts; echo ---; stty | grep echo; echo ---
      ---
      -echo
      ---
      Enter keystore password:
      [snip]
      ---
      ---

            sherman Xueming Shen
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: