Fix default password - use shorter password for bcrypt

This commit is contained in:
2026-01-26 22:26:44 +11:00
parent 1729d07b64
commit 5284cce20d

View File

@@ -33,7 +33,7 @@ def init_database():
print("Adding default family members...")
# Family members with default password "changeme123"
# Family members with default password "password123"
family_members = [
{"username": "lou", "email": "lou@family.local", "full_name": "Lou", "is_admin": False},
{"username": "jess", "email": "jess@family.local", "full_name": "Jess", "is_admin": True},
@@ -42,7 +42,7 @@ def init_database():
{"username": "bella", "email": "bella@family.local", "full_name": "Bella", "is_admin": False},
]
default_password = "changeme123"
default_password = "password123" # Shorter password for bcrypt (max 72 bytes)
hashed_password = get_password_hash(default_password)
for member_data in family_members:
@@ -58,12 +58,12 @@ def init_database():
db.commit()
print("✅ Family members added successfully!")
print("\n📋 Default Login Credentials:")
print(" Username: jess (admin) | Password: changeme123")
print(" Username: lou | Password: changeme123")
print(" Username: william | Password: changeme123")
print(" Username: xander | Password: changeme123")
print(" Username: bella | Password: changeme123")
print("\n🔑 Default Login Credentials:")
print(" Username: jess (admin) | Password: password123")
print(" Username: lou | Password: password123")
print(" Username: william | Password: password123")
print(" Username: xander | Password: password123")
print(" Username: bella | Password: password123")
print("\n⚠️ Please change these passwords after first login!")
except Exception as e: