[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

Merlijn van Deen report at bugs.python.org
Fri Feb 18 23:43:44 CET 2011


Merlijn van Deen <valhallasw at gmail.com> added the comment:

Sorry, I'm not going to run my patch through the entire test suite, I've got better things to do with my time than setting up a working python-development-test-bench. Especially for a one-line-revert.

The result now is:

valhallasw at dorthonion:~/src/pythonpatch$ python -c "import getpass; print getpass.getpass().__repr__()"
Password: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "getpass.py", line 71, in unix_getpass
    passwd = _raw_input(prompt, stream, input=input)
  File "getpass.py", line 133, in _raw_input
    line = input.readline()
KeyboardInterrupt


As for a patch - see attachment. It reverts one change from r76000
http://svn.python.org/view/python/trunk/Lib/getpass.py?r1=74860&r2=76000&pathrev=76000 line 65

The ISIG flag is copied from getpass.c (http://www.koders.com/c/fid3C9D79A0C31256E7875CB8930CF8B9E49BDA8C12.aspx line 122). According to the r76000 commit message:

"This change also incorporates some additional getpass implementation
suggestions for security based on an analysis of getpass.c linked to from the issue."
'The issue' should probably be issue7208, but I cannot find any reference to getpass.c there.

----------
keywords: +patch
Added file: http://bugs.python.org/file20789/issue11236.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11236>
_______________________________________


More information about the Python-bugs-list mailing list