Changeset 15287 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 9 Jan 2019, 21:17:08 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r14699 r15287 273 273 name.replace('-', ' - ')).replace(' - ', '-') 274 274 275 def genPassword(self, length= 8, chars=string.letters + string.digits):275 def genPassword(self, length=4, chars=string.letters + string.digits): 276 276 """Generate a random password. 277 277 """ 278 return ''.join([r().choice(chars) for i in range(length)]) 278 return ''.join([ 279 r().choice(string.uppercase) + 280 r().choice(string.lowercase) + 281 r().choice(string.digits) for i in range(length)]) 279 282 280 283 def sendCredentials(self, user, password=None, url_info=None, msg=None):
Note: See TracChangeset for help on using the changeset viewer.