[Patches] Patch to make tempfile return random filenames

Guido van Rossum guido@python.org
Thu, 25 May 2000 11:27:54 -0500


> | >pps. while on the subject of security, i think the
> | >getpass module should raise an exception if it fails to
> | >get the tty into a non-echoing mode. it could fall
> | >back to stty...
> | 
> | The current version prints a warning message if the
> | password will be echoed.  The warning is printed 
> | for each call to getpass.  Is this sufficient or 
> | do you think that an exception is necessary?  Not sure myself.
> 
> i guess it is better than nothing, but it would be nice to at least
> have the option to have an exception raised. (i would consider it a
> malfunction for, say, a password-changing program to echo the
> password in the clear.)

Raising an exception means that the program cannot proceed.  With the
current warning, the user can decide whether to proceed or not (she
can always hit ^C to interrupt the program).  Depending on the
situation, it may be more important to the user to be able to proceed
than it is to debug the program -- the password may not be terribly
important, or there may be no-one else around who could read the
screen.  (And don't give me science fiction stories about technology
that can read your screen from 300 feet away.  It exists, but there
surely are easier ways to steal your password even if it isn't
echoed. ;-)

--Guido van Rossum (home page: http://www.python.org/~guido/)