0003-utils-misc-add-sms-code-creation-utilitary-function-.patch
src/authentic2/utils/misc.py | ||
---|---|---|
1341 | 1341 |
) |
1342 | 1342 | |
1343 | 1343 | |
1344 |
def create_sms_code(): |
|
1345 |
return ''.join( |
|
1346 |
random.choices( |
|
1347 |
settings.SMS_CODE_ALLOWED_CHARACTERS, |
|
1348 |
k=settings.SMS_CODE_LENGTH, |
|
1349 |
) |
|
1350 |
) |
|
1351 | ||
1352 | ||
1344 | 1353 |
class PasswordChangeError(Exception): |
1345 | 1354 |
def __init__(self, message): |
1346 | 1355 |
self.message = message |
1347 |
- |