summaryrefslogtreecommitdiffstats
path: root/Lib/getpass.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 76000 via svnmerge fromGregory P. Smith2009-11-011-3/+8
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76000 | gregory.p.smith | 2009-10-31 14:26:08 -0700 (Sat, 31 Oct 2009) | 7 lines Fixes issue7208 - getpass would still allow the password to be echoed on Solaris due to not flushing the input buffer. This change also incorporates some additional getpass implementation suggestions for security based on an analysis of getpass.c linked to from the issue. ........
* Major improvements:Gregory P. Smith2008-04-221-34/+76
| | | | | | | | | * Default to using /dev/tty for the password prompt and input before falling back to sys.stdin and sys.stderr. * Use sys.stderr instead of sys.stdout. * print the 'password may be echoed' warning to stream used to display the prompt rather than always sys.stderr. * warn() with GetPassWarning when input may be echoed.
* If sys.stdin is not a tty, fall back to default_getpass after printingGregory P. Smith2008-04-211-0/+4
| | | | a warning instead of failing with a termios.error.
* Bug #1445068: getpass.getpass() can now be given an explicit streamGeorg Brandl2006-03-311-10/+15
| | | | argument to specify where to write the prompt.
* Fix SF #640094, on win32 getpass runs into unix_getpassNeal Norwitz2002-11-201-1/+4
| | | | | | | | Make sure we have a UNIX-compatible termios. Apparently, McMillan Installer made a termios on windows which caused unix_getpass() to be used instead of win_getpass(). Will backport.
* win_getpass(): if sys.stdin is not sys.__stdin__, useGuido van Rossum2001-08-301-0/+2
| | | | | | | default_getpass(). This should prevent hanging when it is called in IDLE. Fixes SF bug #455648.
* Remove two redundant statements (PyChecker).Guido van Rossum2001-08-131-2/+0
|
* Get the needed constants from termios, not TERMIOS.Fred Drake2001-02-271-4/+4
|
* more __all__ updatesSkip Montanaro2001-01-201-0/+2
|
* Whitespace normalization.Tim Peters2001-01-141-76/+75
|
* Simple changes by Gerrit Holl - move author acknowledgements out ofGuido van Rossum2000-02-281-2/+3
| | | | docstrings into comments.
* print a warning if the password will be echoed.Jeremy Hylton1999-10-181-22/+26
| | | | | | At import time, getpass will be bound to the appropriate platform-specific function. If the platform's echo-disabler is not available, default_getpass, which prints the warning, will be used
* Mod by Jack Jansen: on Macintosh, use EasyDialogs.GetPassword if itGuido van Rossum1999-02-111-1/+8
| | | | exists.
* Do the check for lacking sys.stdin.fileno() *before* testing forGuido van Rossum1998-09-221-4/+4
| | | | | | Windows. If sys.stdin doesn't appear to be a real file (characterized by having a working fileno()), don't use any console specific methods -- go straight to the default.
* When sys.stdin.fileno() doesn't work, fall back to default_getpass()Guido van Rossum1998-09-211-1/+4
| | | | -- don't just die.
* Don't use raw_input() to ask for the password; this puts the passwordGuido van Rossum1998-07-281-2/+17
| | | | in the GNU readline history buffer which is not such a great idea.
* Don't catch interrupts in getpass() -- the finally clause will resetGuido van Rossum1998-06-121-2/+3
| | | | | | | the tty and the caller can deal with the interrupt. In the windows version, recognize ^C and raise KeyboardInterrupt (not sure if this is needed, but can't hurt).
* Be nicer to systems that have neither termios nor msvcrt.Guido van Rossum1998-04-131-1/+10
|
* Another new utility: getpass() prompts for a password, with echo off.Guido van Rossum1998-04-091-0/+79
Also contains getuser(), which returns the username (not prompting though). These work on Unix and Windows!