diff 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
line wrap: on
line diff
--- a/roundup/cgi/form_parser.py	Thu Apr 14 18:27:51 2011 +0000
+++ b/roundup/cgi/form_parser.py	Fri Apr 15 08:09:59 2011 +0000
@@ -383,7 +383,7 @@
                     raise FormError, self._('Password and confirmation text '
                         'do not match')
                 try:
-                    value = password.Password(value)
+                    value = password.Password(value, config=self.db.config)
                 except hyperdb.HyperdbValueError, msg:
                     raise FormError, msg
 

Roundup Issue Tracker: http://roundup-tracker.org/