[CMF-checkins] CVS: Products/CMFCore - RegistrationTool.py:1.24
Yvo Schubbe
y.2004_ at wcm-solutions.de
Wed Sep 29 13:13:51 EDT 2004
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv6614/CMFCore
Modified Files:
RegistrationTool.py
Log Message:
- excluded 'OQ0Il1' from generated passwords
=== Products/CMFCore/RegistrationTool.py 1.23 => 1.24 ===
--- Products/CMFCore/RegistrationTool.py:1.23 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/RegistrationTool.py Wed Sep 29 13:13:20 2004
@@ -20,9 +20,6 @@
from OFS.SimpleItem import SimpleItem
from AccessControl import ClassSecurityInfo
from random import choice
-from string import lowercase
-from string import uppercase
-from string import digits
from ActionProviderBase import ActionProviderBase
from permissions import AddPortalMember
@@ -87,14 +84,11 @@
security.declarePublic('generatePassword')
def generatePassword(self):
- '''Generates a password which is guaranteed to comply
- with the password policy.
- '''
- chars = lowercase[:26] + uppercase[:26] + digits
- result = []
- for n in range(6):
- result.append( choice(chars) )
- return ''.join(result)
+ """ Generate a valid password.
+ """
+ # we don't use these to avoid typos: OQ0Il1
+ chars = 'ABCDEFGHJKLMNPRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789'
+ return ''.join( [ choice(chars) for i in range(6) ] )
security.declareProtected(AddPortalMember, 'addMember')
def addMember(self, id, password, roles=('Member',), domains='',
More information about the CMF-checkins
mailing list