Message5874
The default Python getpass library uses termios, which is a shared C library object. Jython does not recognize this file, because it uses the JDK. Attempting to import termios causes the getpass module to throw an import error, forcing the default getpass (raw_input) to be called, thusly causing the plaintext password to be displayed on-screen.
In attempts to fix this issue, I instead imported java.lang.System.console, which is only available in JDK >= 1.6. (http://java.sun.com/javase/6/docs/api/java/io/Console.html#readPassword%28java.lang.String,%20java.lang.Object...%29)
I'm attaching a revised getpass module (${JYTHON_HOME}/Lib/getpass.py) which utilizes this import method. |
|
Date |
User |
Action |
Args |
2010-07-06 17:07:56 | umairghani | set | recipients:
+ umairghani |
2010-07-06 17:07:56 | umairghani | set | messageid: <1278436076.61.0.325956385834.issue1628@psf.upfronthosting.co.za> |
2010-07-06 17:07:55 | umairghani | link | issue1628 messages |
2010-07-06 17:07:55 | umairghani | create | |
|