fix: Use reserved example.com as bogus instead of email.com domain. (#2551)

`email.com` is not a reserved domain, incorrect configuration could result in unintentional effects.
`example.com` is reserved by IANA for bogus purposes, see RFC 6761.
This commit is contained in:
Flightkick 2023-09-23 15:56:34 +00:00 committed by GitHub
parent a22d500603
commit bb9afd86c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 22 additions and 22 deletions

View File

@ -231,7 +231,7 @@ def recipe_data(name: str, slug: str, id: str, userId: str, groupId: str) -> dic
} }
def login(username="changeme@email.com", password="MyPassword"): def login(username="changeme@example.com", password="MyPassword"):
payload = {"username": username, "password": password} payload = {"username": username, "password": password}
r = requests.post("http://localhost:9000/api/auth/token", payload) r = requests.post("http://localhost:9000/api/auth/token", payload)

View File

@ -33,7 +33,7 @@ function import_from_file () {
} }
input="list" input="list"
mail="changeme@email.com" mail="changeme@example.com"
password="MyPassword" password="MyPassword"
mealie_url=http://localhost:9000 mealie_url=http://localhost:9000
@ -85,7 +85,7 @@ def import_from_file(input_file, token, mealie_url):
print(response.text) print(response.text)
input_file="list" input_file="list"
mail="changeme@email.com" mail="changeme@example.com"
password="MyPassword" password="MyPassword"
mealie_url="http://localhost:9000" mealie_url="http://localhost:9000"

View File

@ -9,7 +9,7 @@
| PUID | 911 | UserID permissions between host OS and container | | PUID | 911 | UserID permissions between host OS and container |
| PGID | 911 | GroupID permissions between host OS and container | | PGID | 911 | GroupID permissions between host OS and container |
| DEFAULT_GROUP | Home | The default group for users | | DEFAULT_GROUP | Home | The default group for users |
| DEFAULT_EMAIL | changeme@email.com | The default username for the superuser | | DEFAULT_EMAIL | changeme@example.com | The default username for the superuser |
| BASE_URL | http://localhost:8080 | Used for Notifications | | BASE_URL | http://localhost:8080 | Used for Notifications |
| TOKEN_TIME | 48 | The time in hours that a login/auth token is valid | | TOKEN_TIME | 48 | The time in hours that a login/auth token is valid |
| API_PORT | 9000 | The port exposed by backend API. **Do not change this if you're running in Docker** | | API_PORT | 9000 | The port exposed by backend API. **Do not change this if you're running in Docker** |

View File

@ -69,7 +69,7 @@ You should see the containers start up without error. You should now be able to
!!! tip "Default Credentials" !!! tip "Default Credentials"
**Username:** changeme@email.com **Username:** changeme@example.com
**Password:** MyPassword **Password:** MyPassword

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<v-banner v-if="isDemo" sticky> <v-banner v-if="isDemo" sticky>
<div class="text-center"> <div class="text-center">
<b> {{ $t("demo.info_message_with_version", { version: version }) }} </b> | <b> {{ $t("demo.info_message_with_version", { version: version }) }} </b> |
{{ $t("demo.demo_username", { username: "changeme@email.com" }) }} | {{ $t("demo.demo_username", { username: "changeme@example.com" }) }} |
{{ $t("demo.demo_password", { password: "demo" }) }} {{ $t("demo.demo_password", { password: "demo" }) }}
</div> </div>
</v-banner> </v-banner>

View File

@ -81,7 +81,7 @@ class AppSettings(BaseSettings):
return self.DB_PROVIDER.db_url_public if self.DB_PROVIDER else None return self.DB_PROVIDER.db_url_public if self.DB_PROVIDER else None
DEFAULT_GROUP: str = "Home" DEFAULT_GROUP: str = "Home"
DEFAULT_EMAIL: str = "changeme@email.com" DEFAULT_EMAIL: str = "changeme@example.com"
DEFAULT_PASSWORD: str = "MyPassword" DEFAULT_PASSWORD: str = "MyPassword"
# =============================================== # ===============================================

View File

@ -12,7 +12,7 @@ def dev_users() -> list[dict]:
{ {
"full_name": "Jason", "full_name": "Jason",
"username": "jason", "username": "jason",
"email": "jason@email.com", "email": "jason@example.com",
"password": hash_password(settings.DEFAULT_PASSWORD), "password": hash_password(settings.DEFAULT_PASSWORD),
"group": settings.DEFAULT_GROUP, "group": settings.DEFAULT_GROUP,
"admin": False, "admin": False,
@ -20,7 +20,7 @@ def dev_users() -> list[dict]:
{ {
"full_name": "Bob", "full_name": "Bob",
"username": "bob", "username": "bob",
"email": "bob@email.com", "email": "bob@example.com",
"password": hash_password(settings.DEFAULT_PASSWORD), "password": hash_password(settings.DEFAULT_PASSWORD),
"group": settings.DEFAULT_GROUP, "group": settings.DEFAULT_GROUP,
"admin": False, "admin": False,
@ -28,7 +28,7 @@ def dev_users() -> list[dict]:
{ {
"full_name": "Sarah", "full_name": "Sarah",
"username": "sarah", "username": "sarah",
"email": "sarah@email.com", "email": "sarah@example.com",
"password": hash_password(settings.DEFAULT_PASSWORD), "password": hash_password(settings.DEFAULT_PASSWORD),
"group": settings.DEFAULT_GROUP, "group": settings.DEFAULT_GROUP,
"admin": False, "admin": False,
@ -36,7 +36,7 @@ def dev_users() -> list[dict]:
{ {
"full_name": "Sammy", "full_name": "Sammy",
"username": "sammy", "username": "sammy",
"email": "sammy@email.com", "email": "sammy@example.com",
"password": hash_password(settings.DEFAULT_PASSWORD), "password": hash_password(settings.DEFAULT_PASSWORD),
"group": settings.DEFAULT_GROUP, "group": settings.DEFAULT_GROUP,
"admin": False, "admin": False,

View File

@ -89,7 +89,7 @@ class UserBase(MealieModel):
"example": { "example": {
"username": "ChangeMe", "username": "ChangeMe",
"fullName": "Change Me", "fullName": "Change Me",
"email": "changeme@email.com", "email": "changeme@example.com",
"group": settings.DEFAULT_GROUP, "group": settings.DEFAULT_GROUP,
"admin": "false", "admin": "false",
} }

View File

@ -2,7 +2,7 @@
DEFAULT_GROUP=Home DEFAULT_GROUP=Home
# The Default Credentials for the Super User # The Default Credentials for the Super User
DEFAULT_EMAIL=changeme@email.com DEFAULT_EMAIL=changeme@example.com
DEFAULT_PASSWORD=MyPassword DEFAULT_PASSWORD=MyPassword
# Determines Production Mode, This will set the directory path to use for data storage # Determines Production Mode, This will set the directory path to use for data storage

View File

@ -124,7 +124,7 @@ def test_self_promote_admin(api_client: TestClient, unique_user: TestUser):
update_data = { update_data = {
"id": unique_user.user_id, "id": unique_user.user_id,
"fullName": "Updated Name", "fullName": "Updated Name",
"email": "user@email.com", "email": "user@example.com",
"group": "Home", "group": "Home",
"admin": True, "admin": True,
} }

View File

@ -31,7 +31,7 @@ def test_validators_username(api_client: TestClient, unique_user: TestUser):
def test_validators_email(api_client: TestClient, unique_user: TestUser): def test_validators_email(api_client: TestClient, unique_user: TestUser):
emails = [ emails = [
SimpleCase(value=unique_user.email, is_valid=False), SimpleCase(value=unique_user.email, is_valid=False),
SimpleCase(value=f"{random_string()}@email.com", is_valid=True), SimpleCase(value=f"{random_string()}@example.com", is_valid=True),
] ]
for user in emails: for user in emails:

View File

@ -4,7 +4,7 @@ from mealie.core.config import get_app_settings
from mealie.services.email import EmailService from mealie.services.email import EmailService
from mealie.services.email.email_senders import ABCEmailSender from mealie.services.email.email_senders import ABCEmailSender
FAKE_ADDRESS = "my_secret_email@email.com" FAKE_ADDRESS = "my_secret_email@example.com"
SUBJECTS = {"Mealie Forgot Password", "Invitation to join Mealie", "Test Email"} SUBJECTS = {"Mealie Forgot Password", "Invitation to join Mealie", "Test Email"}

View File

@ -7,7 +7,7 @@ def test_create_user_registration() -> None:
CreateUserRegistration( CreateUserRegistration(
group="Home", group="Home",
group_token=None, group_token=None,
email="SomeValidEmail@email.com", email="SomeValidEmail@example.com",
username="SomeValidUsername", username="SomeValidUsername",
password="SomeValidPassword", password="SomeValidPassword",
password_confirm="SomeValidPassword", password_confirm="SomeValidPassword",
@ -18,7 +18,7 @@ def test_create_user_registration() -> None:
CreateUserRegistration( CreateUserRegistration(
group=None, group=None,
group_token="asdfadsfasdfasdfasdf", group_token="asdfadsfasdfasdfasdf",
email="SomeValidEmail@email.com", email="SomeValidEmail@example.com",
username="SomeValidUsername", username="SomeValidUsername",
password="SomeValidPassword", password="SomeValidPassword",
password_confirm="SomeValidPassword", password_confirm="SomeValidPassword",
@ -33,7 +33,7 @@ def test_group_or_token_validator(group, group_token) -> None:
CreateUserRegistration( CreateUserRegistration(
group=group, group=group,
group_token=group_token, group_token=group_token,
email="SomeValidEmail@email.com", email="SomeValidEmail@example.com",
username="SomeValidUsername", username="SomeValidUsername",
password="SomeValidPassword", password="SomeValidPassword",
password_confirm="SomeValidPassword", password_confirm="SomeValidPassword",
@ -45,7 +45,7 @@ def test_group_or_token_validator(group, group_token) -> None:
def test_group_no_args_passed() -> None: def test_group_no_args_passed() -> None:
with pytest.raises(ValueError): with pytest.raises(ValueError):
CreateUserRegistration( CreateUserRegistration(
email="SomeValidEmail@email.com", email="SomeValidEmail@example.com",
username="SomeValidUsername", username="SomeValidUsername",
password="SomeValidPassword", password="SomeValidPassword",
password_confirm="SomeValidPassword", password_confirm="SomeValidPassword",
@ -59,7 +59,7 @@ def test_password_validator() -> None:
CreateUserRegistration( CreateUserRegistration(
group=None, group=None,
group_token="asdfadsfasdfasdfasdf", group_token="asdfadsfasdfasdfasdf",
email="SomeValidEmail@email.com", email="SomeValidEmail@example.com",
username="SomeValidUsername", username="SomeValidUsername",
password="SomeValidPassword", password="SomeValidPassword",
password_confirm="PasswordDefNotMatch", password_confirm="PasswordDefNotMatch",