Mercurial > p > roundup > code
comparison roundup/cgi/form_parser.py @ 4486:693c75d56ebe
Add new config-option 'password_pbkdf2_default_rounds'...
...in 'main' section to configure the default parameter for new
password generation. Set this to a higher value on faster systems
which want more security. Thanks to Eli Collins for implementing this
(see issue2550688).
This now passes a config object (default None in which case we fall back
to hard-coded parameters) into the password generation routine. This way
we can add further parameters for password generation in the future.
Also added a small regression test for this new feature.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Fri, 15 Apr 2011 08:09:59 +0000 |
| parents | ab4563e97d22 |
| children | 86a270b5b993 |
comparison
equal
deleted
inserted
replaced
| 4485:95aace124a8e | 4486:693c75d56ebe |
|---|---|
| 381 'value for the %s property') % propname | 381 'value for the %s property') % propname |
| 382 if value != confirm.value: | 382 if value != confirm.value: |
| 383 raise FormError, self._('Password and confirmation text ' | 383 raise FormError, self._('Password and confirmation text ' |
| 384 'do not match') | 384 'do not match') |
| 385 try: | 385 try: |
| 386 value = password.Password(value) | 386 value = password.Password(value, config=self.db.config) |
| 387 except hyperdb.HyperdbValueError, msg: | 387 except hyperdb.HyperdbValueError, msg: |
| 388 raise FormError, msg | 388 raise FormError, msg |
| 389 | 389 |
| 390 elif isinstance(proptype, hyperdb.Multilink): | 390 elif isinstance(proptype, hyperdb.Multilink): |
| 391 # convert input to list of ids | 391 # convert input to list of ids |
