Mercurial > p > roundup > code
comparison roundup/mailgw.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 | 9be284ce56b7 |
| children | 8df9492c2746 |
comparison
equal
deleted
inserted
replaced
| 4485:95aace124a8e | 4486:693c75d56ebe |
|---|---|
| 1686 | 1686 |
| 1687 # create! | 1687 # create! |
| 1688 try: | 1688 try: |
| 1689 return db.user.create(username=trying, address=address, | 1689 return db.user.create(username=trying, address=address, |
| 1690 realname=realname, roles=db.config.NEW_EMAIL_USER_ROLES, | 1690 realname=realname, roles=db.config.NEW_EMAIL_USER_ROLES, |
| 1691 password=password.Password(password.generatePassword()), | 1691 password=password.Password(password.generatePassword(), config=db.config), |
| 1692 **user_props) | 1692 **user_props) |
| 1693 except exceptions.Reject: | 1693 except exceptions.Reject: |
| 1694 return 0 | 1694 return 0 |
| 1695 else: | 1695 else: |
| 1696 return 0 | 1696 return 0 |
