Trim salt when creating the challenge.
This commit is contained in:
parent
4083be8e8c
commit
f438d0e947
@ -309,7 +309,8 @@ class AuthenticationViewSet(viewsets.ViewSet):
|
||||
|
||||
def get_encryption_key(self, salt):
|
||||
key = nacl.hash.blake2b(settings.SECRET_KEY.encode(), encoder=nacl.encoding.RawEncoder)
|
||||
return nacl.hash.blake2b(b'', key=key, salt=salt, person=b'etesync-auth', encoder=nacl.encoding.RawEncoder)
|
||||
return nacl.hash.blake2b(b'', key=key, salt=salt[:nacl.hash.BLAKE2B_SALTBYTES], person=b'etesync-auth',
|
||||
encoder=nacl.encoding.RawEncoder)
|
||||
|
||||
def get_queryset(self):
|
||||
return User.objects.all()
|
||||
|
Loading…
Reference in New Issue
Block a user