Py3 fixes for guest hash generation
This commit is contained in:
parent
a36ff64a82
commit
e61d87d37c
1 changed files with 3 additions and 2 deletions
|
@ -123,8 +123,9 @@ def proposal_speaker_manage(request, pk):
|
|||
Q(user=None, invite_email=email_address)
|
||||
)
|
||||
except Speaker.DoesNotExist:
|
||||
salt = hashlib.sha1(str(random.random())).hexdigest()[:5]
|
||||
token = hashlib.sha1(salt + email_address).hexdigest()
|
||||
salt = hashlib.sha1(str(random.random()).encode('UTF-8')).hexdigest()[:5]
|
||||
saltedemail = (salt + email_address).encode('UTF-8')
|
||||
token = hashlib.sha1(saltedemail).hexdigest()
|
||||
pending = Speaker.objects.create(
|
||||
invite_email=email_address,
|
||||
invite_token=token,
|
||||
|
|
Loading…
Reference in a new issue