mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
using salted sha512 for htpasswd by default
This commit is contained in:
@@ -20,12 +20,12 @@
|
||||
# ========================================================================== #
|
||||
|
||||
|
||||
import passlib.apache
|
||||
|
||||
from ...yamlconf import Option
|
||||
|
||||
from ...validators.os import valid_abs_file
|
||||
|
||||
from ...crypto import KvmdHtpasswdFile
|
||||
|
||||
from . import BaseAuthService
|
||||
|
||||
|
||||
@@ -43,5 +43,5 @@ class Plugin(BaseAuthService):
|
||||
async def authorize(self, user: str, passwd: str) -> bool:
|
||||
assert user == user.strip()
|
||||
assert user
|
||||
htpasswd = passlib.apache.HtpasswdFile(self.__path)
|
||||
htpasswd = KvmdHtpasswdFile(self.__path)
|
||||
return htpasswd.check_password(user, passwd)
|
||||
|
||||
Reference in New Issue
Block a user