This commit is contained in:
Renaud Boyer 2020-12-06 22:07:18 +01:00
parent f3303ee6bb
commit a8d67f94e2
1 changed files with 3 additions and 5 deletions

View File

@ -16,7 +16,7 @@ from app.extensions import db
from app.log import LOG
from app.models import Alias, AuthorizedAddress
from app.models import Mailbox
from app.pgp_utils import PGPException, load_public_key, load_public_key_and_check
from app.pgp_utils import PGPException, load_public_key_and_check
class ChangeEmailForm(FlaskForm):
@ -199,13 +199,11 @@ def mailbox_detail_route(mailbox_id):
def verify_mailbox_change(user, mailbox, new_email):
s = Signer(MAILBOX_SECRET)
mailbox_id_signed = s.sign(str(mailbox.id)).decode()
verification_url = (
URL + "/dashboard/mailbox/confirm_change" + f"?mailbox_id={mailbox_id_signed}"
)
verification_url = f"{URL}/dashboard/mailbox/confirm_change?mailbox_id={mailbox_id_signed}"
send_email(
new_email,
f"Confirm mailbox change on SimpleLogin",
"Confirm mailbox change on SimpleLogin",
render(
"transactional/verify-mailbox-change.txt",
user=user,