summaryrefslogtreecommitdiff
path: root/kvmd/apps/ipmi
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-05-15 17:30:14 +0300
committerDevaev Maxim <[email protected]>2020-05-16 17:35:10 +0300
commit2eef3061ce8e3222da7864bfe4fd2bf767b5e5f1 (patch)
treef9adc498cc1ebc5362489bd9ae550a36dec4f0a0 /kvmd/apps/ipmi
parenta364e689c6d944be90ce80ad34594b21309cdb05 (diff)
improved security checks
Diffstat (limited to 'kvmd/apps/ipmi')
-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}")