X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Fpassword.py;h=8400f67a1bfc59c7a980aa6d6ff6a89a32153b9d;hb=3d6e89cfde3341b3bdb4a111f15b4ffae3000e27;hp=0ba2c5e39f3c7d3b37ffa83c95297e27d2679907;hpb=ef066b9357a8d67c168564b5ff38ac5e84b4e270;p=roundup.git diff --git a/roundup/password.py b/roundup/password.py index 0ba2c5e..8400f67 100644 --- a/roundup/password.py +++ b/roundup/password.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: password.py,v 1.6 2002-09-26 07:39:21 richard Exp $ +# $Id: password.py,v 1.8 2002-12-18 23:57:09 richard Exp $ __doc__ = """ Password handling (encoding, decoding). @@ -23,7 +23,7 @@ Password handling (encoding, decoding). import sha, re, string try: - import crypt: + import crypt except: crypt = None pass @@ -31,6 +31,8 @@ except: 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: