Message5874

Author umairghani
Recipients umairghani
Date 2010-07-06.17:07:52
SpamBayes Score 5.640125e-06
Marked as misclassified No
Message-id <1278436076.61.0.325956385834.issue1628@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-07-06 17:07:56umairghanisetrecipients: + umairghani
2010-07-06 17:07:56umairghanisetmessageid: <1278436076.61.0.325956385834.issue1628@psf.upfronthosting.co.za>
2010-07-06 17:07:55umairghanilinkissue1628 messages
2010-07-06 17:07:55umairghanicreate