mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
Fixed #29324 -- Made SECRET_KEY validation lazy (on first access).
This commit is contained in:
committed by
GitHub
parent
9c9a3fe118
commit
948a874425
@@ -12,7 +12,10 @@ class PasswordResetTokenGenerator:
|
||||
"""
|
||||
key_salt = "django.contrib.auth.tokens.PasswordResetTokenGenerator"
|
||||
algorithm = 'sha256'
|
||||
secret = settings.SECRET_KEY
|
||||
secret = None
|
||||
|
||||
def __init__(self):
|
||||
self.secret = self.secret or settings.SECRET_KEY
|
||||
|
||||
def make_token(self, user):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user