feat(ui): replace configuration editors with graphical forms
CI / javascript-check (push) Successful in 14s
CI / container-policy (push) Successful in 4s
CI / python-tests (push) Successful in 1m48s
CI / container-verify (push) Skipped
CI / container-publish (push) Successful in 49s

This commit is contained in:
BartelLuis
2026-09-14 21:52:39 +02:00
parent 9a6dea34c4
commit 7b979e6243
22 changed files with 1603 additions and 81 deletions
+13
View File
@@ -8,6 +8,13 @@ import re
import secrets
from cryptography.fernet import Fernet
from passlib.hash import sha512_crypt
# The installer requires a Linux crypt hash. The builtin backend also works
# on Python 3.13+, where the standard-library crypt module no longer exists.
_installer_password_hash = sha512_crypt.using(rounds=656000)
_installer_password_hash.set_backend("builtin")
def canonical(value):
@@ -43,6 +50,12 @@ class Security:
result = hashlib.scrypt(password.encode(), salt=salt, n=16384, r=8, p=1)
return "scrypt$" + base64.b64encode(salt).decode() + "$" + base64.b64encode(result).decode()
@staticmethod
def hash_installer_password(password):
if not 12 <= len(password) <= 1024 or "\x00" in password:
raise ValueError("Root-Passwörter benötigen 12 bis 1024 Zeichen ohne Nullzeichen.")
return _installer_password_hash.hash(password)
@staticmethod
def verify_password(password, stored):
try: