Skip to content

Commit a40911f

Browse files
committed
Bump django-upgrade to target 4.2 and fix issue
1 parent 95670d2 commit a40911f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
rev: "1.20.0"
1313
hooks:
1414
- id: django-upgrade
15-
args: [--target-version, "2.2"]
15+
args: [--target-version, "4.2"]
1616

1717
- repo: https://github.com/pre-commit/pre-commit-hooks
1818
rev: 'v4.6.0'

password_policies/conf/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
TEMPLATE_403_PAGE = getattr(settings, "TEMPLATE_403_PAGE", "403.html")
184184

185185

186-
PASSWORD_RESET_TIMEOUT_DAYS = 1
186+
PASSWORD_RESET_TIMEOUT = 60 * 60 * 24 * 1
187187

188188
PASSWORD_POLICIES_LAST_CHECKED_SESSION_KEY = "_password_policies_last_checked"
189189
PASSWORD_POLICIES_EXPIRED_SESSION_KEY = "_password_policies_expired"

password_policies/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def dispatch(self, request, *args, **kwargs):
168168
self.user = None
169169
else:
170170
signer = signing.TimestampSigner()
171-
max_age = settings.PASSWORD_RESET_TIMEOUT_DAYS * 24 * 60 * 60
171+
max_age = settings.PASSWORD_RESET_TIMEOUT
172172
il = (self.user.password, self.timestamp, self.signature)
173173
try:
174174
signer.unsign(":".join(il), max_age=max_age)

0 commit comments

Comments
 (0)