- {{ form.submit(class="btn btn-md btn-primary btn-outlined") }}
+
+
+ {{ form.submit(class="btn btn-md btn-primary btn-outlined w-100") }}
+
+
+ {{ form.nonce() }}
- {{ form.nonce() }}
{% endwith %}
diff --git a/CTFd/utils/email/__init__.py b/CTFd/utils/email/__init__.py
index 45ebe46f..aa8dfe33 100644
--- a/CTFd/utils/email/__init__.py
+++ b/CTFd/utils/email/__init__.py
@@ -8,8 +8,11 @@ from CTFd.utils.security.signing import serialize
DEFAULT_VERIFICATION_EMAIL_SUBJECT = "Confirm your account for {ctf_name}"
DEFAULT_VERIFICATION_EMAIL_BODY = (
- "Please click the following link to confirm your email "
- "address for {ctf_name}: {url}"
+ "Welcome to {ctf_name}!\n\n"
+ "Click the following link to confirm and activate your account:\n"
+ "{url}"
+ "\n\n"
+ "If the link is not clickable, try copying and pasting it into your browser."
)
DEFAULT_SUCCESSFUL_REGISTRATION_EMAIL_SUBJECT = "Successfully registered for {ctf_name}"
DEFAULT_SUCCESSFUL_REGISTRATION_EMAIL_BODY = (
@@ -17,20 +20,22 @@ DEFAULT_SUCCESSFUL_REGISTRATION_EMAIL_BODY = (
)
DEFAULT_USER_CREATION_EMAIL_SUBJECT = "Message from {ctf_name}"
DEFAULT_USER_CREATION_EMAIL_BODY = (
- "An account has been created for you for {ctf_name} at {url}. \n\n"
+ "A new account has been created for you for {ctf_name} at {url}. \n\n"
"Username: {name}\n"
"Password: {password}"
)
DEFAULT_PASSWORD_RESET_SUBJECT = "Password Reset Request from {ctf_name}"
DEFAULT_PASSWORD_RESET_BODY = (
- "Did you initiate a password reset? "
+ "Did you initiate a password reset on {ctf_name}? "
"If you didn't initiate this request you can ignore this email. \n\n"
- "Click the following link to reset your password:\n{url}"
+ "Click the following link to reset your password:\n{url}\n\n"
+ "If the link is not clickable, try copying and pasting it into your browser."
)
DEFAULT_PASSWORD_CHANGE_ALERT_SUBJECT = "Password Change Confirmation for {ctf_name}"
DEFAULT_PASSWORD_CHANGE_ALERT_BODY = (
"Your password for {ctf_name} has been changed.\n\n"
- "If you didn't request a password change you can reset your password here: {url}"
+ "If you didn't request a password change you can reset your password here:\n{url}\n\n"
+ "If the link is not clickable, try copying and pasting it into your browser."
)
diff --git a/tests/users/test_auth.py b/tests/users/test_auth.py
index 4ad92e26..ea6d9853 100644
--- a/tests/users/test_auth.py
+++ b/tests/users/test_auth.py
@@ -303,7 +303,7 @@ def test_user_can_confirm_email(mock_smtp):
client = login_as_user(app, name="user1", password="password")
r = client.get("http://localhost/confirm")
- assert "Need to resend the confirmation email?" in r.get_data(as_text=True)
+ assert "We've sent a confirmation email" in r.get_data(as_text=True)
# smtp send message function was called
mock_smtp.return_value.send_message.assert_called()
@@ -365,9 +365,10 @@ def test_user_can_reset_password(mock_smtp):
# Build the email
msg = (
- "Did you initiate a password reset? If you didn't initiate this request you can ignore this email. "
+ "Did you initiate a password reset on CTFd? If you didn't initiate this request you can ignore this email. "
"\n\nClick the following link to reset your password:\n"
- "http://localhost/reset_password/InVzZXJAdXNlci5jb20i.TxD0vg.28dY_Gzqb1TH9nrcE_H7W8YFM-U"
+ "http://localhost/reset_password/InVzZXJAdXNlci5jb20i.TxD0vg.28dY_Gzqb1TH9nrcE_H7W8YFM-U\n\n"
+ "If the link is not clickable, try copying and pasting it into your browser."
)
ctf_name = get_config("ctf_name")
diff --git a/tests/utils/test_email.py b/tests/utils/test_email.py
index 7a9397e5..edf4d294 100644
--- a/tests/utils/test_email.py
+++ b/tests/utils/test_email.py
@@ -182,9 +182,10 @@ def test_verify_email(mock_smtp):
# This is currently not actually validated
msg = (
- "Please click the following link to confirm"
- " your email address for CTFd:"
- " http://localhost/confirm/InVzZXJAdXNlci5jb20i.TxD0vg.28dY_Gzqb1TH9nrcE_H7W8YFM-U"
+ "Welcome to CTFd!\n\n"
+ "Click the following link to confirm and activate your account:\n"
+ "http://localhost/confirm/InVzZXJAdXNlci5jb20i.TxD0vg.28dY_Gzqb1TH9nrcE_H7W8YFM-U\n\n"
+ "If the link is not clickable, try copying and pasting it into your browser."
)
ctf_name = get_config("ctf_name")