summaryrefslogtreecommitdiff
path: root/kvmd/plugins/auth
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-10-24 01:21:34 +0300
committerDevaev Maxim <[email protected]>2019-10-24 01:21:34 +0300
commit97e2d9128c37805ba649807f5f923d1d1e92907f (patch)
tree36ddaa7318cea97edf55ef994052b14a28e36305 /kvmd/plugins/auth
parent372bf2a4afc93726ad63090202b517c939a183d9 (diff)
strict file validation
Diffstat (limited to 'kvmd/plugins/auth')
-rw-r--r--kvmd/plugins/auth/htpasswd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/auth/htpasswd.py b/kvmd/plugins/auth/htpasswd.py
index 2f4e2df8..94e29711 100644
--- a/kvmd/plugins/auth/htpasswd.py
+++ b/kvmd/plugins/auth/htpasswd.py
@@ -26,7 +26,7 @@ import passlib.apache
from ...yamlconf import Option
-from ...validators.os import valid_abs_path_exists
+from ...validators.os import valid_abs_file
from . import BaseAuthService
@@ -39,7 +39,7 @@ class Plugin(BaseAuthService):
@classmethod
def get_plugin_options(cls) -> Dict:
return {
- "file": Option("/etc/kvmd/htpasswd", type=valid_abs_path_exists, unpack_as="path"),
+ "file": Option("/etc/kvmd/htpasswd", type=valid_abs_file, unpack_as="path"),
}
async def authorize(self, user: str, passwd: str) -> bool: