Development

This commit is contained in:
Matthew Grotke 2026-06-13 10:02:51 -04:00
parent 8a8e947fcf
commit 450c0081f7
9 changed files with 59 additions and 28 deletions

View file

@ -373,7 +373,7 @@ def setup_docker_compose(reuse_config=False):
print()
while True:
import getpass as _gp
pw = _gp.getpass(f" Password for {manager_email}: ")
pw = _gp.getpass(f" Create password for {manager_email}: ")
pw2 = _gp.getpass(f" Confirm password: ")
if pw != pw2:
print(" Passwords do not match. Try again.")
@ -382,8 +382,10 @@ def setup_docker_compose(reuse_config=False):
print(" Password must be at least 8 characters.")
continue
break
import bcrypt as _bcrypt
pw_hash = _bcrypt.hashpw(pw.encode('utf-8'), _bcrypt.gensalt()).decode('utf-8')
import hashlib as _hashlib, os as _os
_salt = _os.urandom(16)
_h = _hashlib.scrypt(pw.encode('utf-8'), salt=_salt, n=16384, r=8, p=1, dklen=32)
pw_hash = f'scrypt:16384:8:1:{_salt.hex()}:{_h.hex()}'
app_config = {
"initial_manager_email": manager_email,
"credentials_key": credentials_key,