confirmation: Change confirmation keys to have length 24.

This commit is contained in:
Rishi Gupta
2017-07-11 11:52:27 -07:00
committed by Tim Abbott
parent 35ddec0310
commit 394f85eb76
4 changed files with 12 additions and 5 deletions

View File

@@ -196,7 +196,7 @@ def make_client(name):
def find_key_by_email(address):
# type: (Text) -> Optional[Text]
from django.core.mail import outbox
key_regex = re.compile("accounts/do_confirm/([a-f0-9]{40})>")
key_regex = re.compile("accounts/do_confirm/([a-z0-9]{24})>")
for message in reversed(outbox):
if address in message.to:
return key_regex.search(message.body).groups()[0]