mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
Fixed #27518 -- Prevented possibie password reset token leak via HTTP Referer header.
Thanks Florian Apolloner for contributing to this patch and Collin Anderson, Markus Holtermann, and Tim Graham for review.
This commit is contained in:
committed by
Tim Graham
parent
91023d79ec
commit
ede59ef6f3
@@ -24,6 +24,8 @@ class PasswordResetTokenGenerator(object):
|
||||
"""
|
||||
Check that a password reset token is correct for a given user.
|
||||
"""
|
||||
if not (user and token):
|
||||
return False
|
||||
# Parse the token
|
||||
try:
|
||||
ts_b36, hash = token.split("-")
|
||||
|
||||
Reference in New Issue
Block a user