improved security checks

This commit is contained in:
Devaev Maxim
2020-05-15 17:30:14 +03:00
parent a364e689c6
commit 2eef3061ce
7 changed files with 46 additions and 26 deletions

View File

@@ -81,6 +81,8 @@ class VncAuthManager:
(kvmd_user, kvmd_passwd) = kvmd_userpass.split(":")
kvmd_user = kvmd_user.strip()
if len(kvmd_user) == 0:
raise VncAuthError(f"Empty KVMD user (right part) at line #{number}")
if vnc_passwd in credentials:
raise VncAuthError(f"Found duplicating VNC password (left part) at line #{number}")