mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Switched to a custom low-iteration Secret hasher to avoid excessive delay when retrieving many Secrets
This commit is contained in:
9
netbox/secrets/hashers.py
Normal file
9
netbox/secrets/hashers.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from django.contrib.auth.hashers import PBKDF2PasswordHasher
|
||||
|
||||
|
||||
class SecretValidationHasher(PBKDF2PasswordHasher):
|
||||
"""
|
||||
We're using Django's stock SHA256 hasher with a low iteration count to avoid introducing excessive delay when
|
||||
retrieving a large number of Secrets (the plaintext of each Secret is validated against its hash upon decryption).
|
||||
"""
|
||||
iterations = 1000
|
Reference in New Issue
Block a user