mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-13 12:38:02 +00:00
Normalize setup admin username (#448)
This commit is contained in:
@@ -54,7 +54,7 @@ def create_default_admin():
|
||||
import bcrypt
|
||||
import json
|
||||
|
||||
username = os.getenv("ODYSSEUS_ADMIN_USER", "admin").strip() or "admin"
|
||||
username = os.getenv("ODYSSEUS_ADMIN_USER", "admin").strip().lower() or "admin"
|
||||
password = os.getenv("ODYSSEUS_ADMIN_PASSWORD") or __import__("secrets").token_urlsafe(18)
|
||||
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
|
||||
auth_data = {
|
||||
|
||||
Reference in New Issue
Block a user