summaryrefslogtreecommitdiff
path: root/kvmd/apps/ipmi/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/apps/ipmi/auth.py')
-rw-r--r--kvmd/apps/ipmi/auth.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/apps/ipmi/auth.py b/kvmd/apps/ipmi/auth.py
index 6b33216a..29804140 100644
--- a/kvmd/apps/ipmi/auth.py
+++ b/kvmd/apps/ipmi/auth.py
@@ -70,9 +70,13 @@ class IpmiAuthManager:
(ipmi_user, ipmi_passwd) = left.split(":")
ipmi_user = ipmi_user.strip()
+ if len(ipmi_user) == 0:
+ raise IpmiPasswdError(f"Empty IPMI user (left) at line #{number}")
(kvmd_user, kvmd_passwd) = right.split(":")
kvmd_user = kvmd_user.strip()
+ if len(kvmd_user) == 0:
+ raise IpmiPasswdError(f"Empty KVMD user (left) at line #{number}")
if ipmi_user in credentials:
raise IpmiPasswdError(f"Found duplicating user {ipmi_user!r} (left) at line #{number}")