fix(wizard): argos_users.json va scritto in CONFIG_DIR non DATA_DIR
Il wizard scriveva /opt/argos/data/argos_users.json ma auth.py del backend lo legge da /opt/argos/config/argos_users.json. Risultato: l'utente admin del wizard finiva in un file mai letto, e il backend autogenerava un fallback con password ignota -> login impossibile.
This commit is contained in:
parent
41cb97bea8
commit
fb2984b7f7
|
|
@ -253,7 +253,7 @@ def create_admin_user(data):
|
||||||
salt = _os.urandom(16).hex()
|
salt = _os.urandom(16).hex()
|
||||||
pw_hash = f"{salt}:{hashlib.sha256((salt + password + 'argos-2026').encode()).hexdigest()}"
|
pw_hash = f"{salt}:{hashlib.sha256((salt + password + 'argos-2026').encode()).hexdigest()}"
|
||||||
|
|
||||||
users_file = DATA_DIR / "argos_users.json"
|
users_file = CONFIG_DIR / "argos_users.json"
|
||||||
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
# Leggi utenti esistenti o crea struttura vuota
|
# Leggi utenti esistenti o crea struttura vuota
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue