summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorDenis Costa <deniscostadsc@gmail.com>2017-04-19 16:52:02 -0300
committerDenis Costa <deniscostadsc@gmail.com>2017-04-19 16:52:02 -0300
commitd2c13c6f8535418b7c90d1f0d75fe88b2c68dd85 (patch)
treeeb8732c1160525cfca39d602718fbfb63be3a1ac /service/pixelated
parenta3763301042c5db0231b0e9e2d4a62d41d374d49 (diff)
[#927] Removes recovery url from email
@anikarni
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/account_recovery.py5
-rw-r--r--service/pixelated/assets/recovery.mail.en-US8
-rw-r--r--service/pixelated/assets/recovery.mail.pt-BR8
3 files changed, 8 insertions, 13 deletions
diff --git a/service/pixelated/account_recovery.py b/service/pixelated/account_recovery.py
index dae3da1b..f84aea1a 100644
--- a/service/pixelated/account_recovery.py
+++ b/service/pixelated/account_recovery.py
@@ -24,8 +24,6 @@ from twisted.mail import smtp
from email import message_from_string
from email.utils import formatdate
-from pixelated.resources.account_recovery_resource import AccountRecoveryResource
-
log = Logger()
@@ -77,13 +75,10 @@ class AccountRecovery(object):
'pixelated.assets',
'recovery.mail.%s' % (self._language))
- account_recovery_url = '{}/{}'.format(self._domain, AccountRecoveryResource.BASE_URL)
-
with open(recovery_mail) as mail_template_file:
return message_from_string(mail_template_file.read().format(
domain=self._domain,
recovery_code=binascii.hexlify(code),
- account_recovery_url=account_recovery_url,
backup_email=backup_email,
sender=sender,
date=formatdate(localtime=True)))
diff --git a/service/pixelated/assets/recovery.mail.en-US b/service/pixelated/assets/recovery.mail.en-US
index 8e12c55d..a2e5b1e8 100644
--- a/service/pixelated/assets/recovery.mail.en-US
+++ b/service/pixelated/assets/recovery.mail.en-US
@@ -1,13 +1,13 @@
From: {sender}
Date: {date}
-Subject: Recovery Code
+Subject: Recovery Code for {domain}
To: {backup_email}
Content-Type: text/plain; charset=UTF-8
Hello,
-You are receiving this email because you registered at a Pixelated provider, on {domain}.
-In case you ever forget your password, you can access this link {account_recovery_url} and put the following recovery code:
+You are receiving this email because you registered at a Pixelated provider, on https://{domain}.
+In case you ever forget your password use the following recovery code:
{recovery_code}
@@ -23,4 +23,4 @@ This code is half of a big code to recover your account, the other half is with
You will only succeed if you have both codes, so, never hurts to ask again: SAVE THIS CODE!
-PS: If you didn't create an account at {domain}, please ignore this email.
+PS: If you didn't create an account at https://{domain}, please ignore this email.
diff --git a/service/pixelated/assets/recovery.mail.pt-BR b/service/pixelated/assets/recovery.mail.pt-BR
index 7d0f2a58..c608cb0b 100644
--- a/service/pixelated/assets/recovery.mail.pt-BR
+++ b/service/pixelated/assets/recovery.mail.pt-BR
@@ -1,13 +1,13 @@
From: {sender}
Date: {date}
-Subject: Codigo de Recuperacao
+Subject: Codigo de Recuperacao de {domain}
To: {backup_email}
Content-Type: text/plain; charset=UTF-8
Olá,
-Você está recebendo este email porque você se registrou em um provedor do Pixelated, no {domain}.
-Se algum dia esquecer sua senha, você pode acessar esse link {account_recovery_url} e usar o código abaixo:
+Você está recebendo este email porque você se registrou em um provedor do Pixelated, no https://{domain}.
+Se algum dia esquecer sua senha use o código abaixo:
{recovery_code}
@@ -23,4 +23,4 @@ Nós entedemos que esquecer a senha é algo comum, por isso desenvolvemos uma fo
Esse código é uma metade do código necesário para recuperar a conta. A outra metade está com o administrador da conta. Se você esquecer a senha, use esse código e o do administrador para recuperar acesso a conta. É como se fosse um cadeado com duas chaves :)
Você só terá sucesso se tiver ambos os códigos, então, nunca machuca pedir novamente: GUARDE ESSE CÓDIGO!
-PS: Se você não criou uma conta no site {domain}, por favor ignore esse email.
+PS: Se você não criou uma conta no site https://{domain}, por favor ignore esse email.