diff --git a/seahub/auth/tokens.py b/seahub/auth/tokens.py index 80a0f59511..14cb05dddc 100644 --- a/seahub/auth/tokens.py +++ b/seahub/auth/tokens.py @@ -1,11 +1,11 @@ # Copyright (c) 2012-2016 Seafile Ltd. from datetime import date -from django.conf import settings from django.utils.http import int_to_base36, base36_to_int from django.utils.crypto import constant_time_compare, salted_hmac import six from seahub.base.models import UserLastLogin + class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check tokens for the password @@ -38,7 +38,7 @@ class PasswordResetTokenGenerator(object): return False # Check the timestamp is within limit - if (self._num_days(self._today()) - ts) > settings.PASSWORD_RESET_TIMEOUT_DAYS: + if (self._num_days(self._today()) - ts) > 3: return False return True @@ -77,4 +77,5 @@ class PasswordResetTokenGenerator(object): # Used for mocking in tests return date.today() + default_token_generator = PasswordResetTokenGenerator()