using salted sha512 for htpasswd by default

This commit is contained in:
Maxim Devaev
2025-02-11 16:55:45 +02:00
parent 800d2724b8
commit de4f1903aa
8 changed files with 88 additions and 29 deletions

View File

@@ -22,10 +22,10 @@
import os
import passlib.apache
import pytest
from kvmd.crypto import KvmdHtpasswdFile
from . import get_configured_auth_service
@@ -34,7 +34,7 @@ from . import get_configured_auth_service
async def test_ok__htpasswd_service(tmpdir) -> None: # type: ignore
path = os.path.abspath(str(tmpdir.join("htpasswd")))
htpasswd = passlib.apache.HtpasswdFile(path, new=True)
htpasswd = KvmdHtpasswdFile(path, new=True)
htpasswd.set_password("admin", "pass")
htpasswd.save()