mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-20 06:58:02 +00:00
Fix overwriting verification key upon sending confirmation mail
This commit is contained in:
@@ -359,6 +359,7 @@ class UnconfirmedEmail(BaseAccountModel):
|
|||||||
|
|
||||||
def save(self, force_insert=False, force_update=False, using=None,
|
def save(self, force_insert=False, force_update=False, using=None,
|
||||||
update_fields=None):
|
update_fields=None):
|
||||||
|
if not self.verification_key:
|
||||||
hash_object = hashlib.new('sha256')
|
hash_object = hashlib.new('sha256')
|
||||||
hash_object.update(
|
hash_object.update(
|
||||||
urandom(1024) + self.user.username.encode('utf-8') # pylint: disable=no-member
|
urandom(1024) + self.user.username.encode('utf-8') # pylint: disable=no-member
|
||||||
|
|||||||
Reference in New Issue
Block a user