Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 1144:db13f46cb5f9
password edit now has a confirmation field
registration error punts back to register page
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 15 Sep 2002 22:41:15 +0000 |
| parents | 36ec30d286ea |
| children | 7e0024954954 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Fri Sep 13 08:20:13 2002 +0000 +++ b/roundup/cgi/client.py Sun Sep 15 22:41:15 2002 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.32 2002-09-13 00:08:44 richard Exp $ +# $Id: client.py,v 1.33 2002-09-15 22:41:15 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -596,6 +596,7 @@ self.db.commit() except ValueError, message: self.error_message.append(message) + return # log the new user in self.user = cl.get(self.userid, 'username') @@ -1134,6 +1135,14 @@ if not value: # ignore empty password values continue + if not form.has_key('%s:confirm'%key): + raise ValueError, 'Password and confirmation text do not match' + confirm = form['%s:confirm'%key] + if isinstance(confirm, type([])): + raise ValueError, 'You have submitted more than one value'\ + ' for the %s property'%key + if value != confirm.value: + raise ValueError, 'Password and confirmation text do not match' value = password.Password(value) elif isinstance(proptype, hyperdb.Date): if value:
