Mercurial > p > roundup > code
diff roundup/password.py @ 1343:2e557762ee87
fixed handling of missing password [SF#655632]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 18 Dec 2002 23:57:09 +0000 |
| parents | c0a40d7ec47c |
| children | caae7d8934dc |
line wrap: on
line diff
--- a/roundup/password.py Wed Dec 18 23:21:17 2002 +0000 +++ b/roundup/password.py Wed Dec 18 23:57:09 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: password.py,v 1.7 2002-09-26 13:38:35 gmcm Exp $ +# $Id: password.py,v 1.8 2002-12-18 23:57:09 richard Exp $ __doc__ = """ Password handling (encoding, decoding). @@ -31,6 +31,8 @@ def encodePassword(plaintext, scheme, other=None): '''Encrypt the plaintext password. ''' + if plaintext is None: + plaintext = "" if scheme == 'SHA': s = sha.sha(plaintext).hexdigest() elif scheme == 'crypt' and crypt is not None:
