From b6f9fff2bcec35a98c4b01a4bab3038ee7813ee2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 14 Jun 2022 15:53:19 +0000 Subject: [PATCH] openvpn-authenticator: Don't process configuration when row is too short Signed-off-by: Michael Tremer --- config/ovpn/openvpn-authenticator | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ovpn/openvpn-authenticator b/config/ovpn/openvpn-authenticator index 67fb720855..5773fb40b2 100644 --- a/config/ovpn/openvpn-authenticator +++ b/config/ovpn/openvpn-authenticator @@ -277,8 +277,8 @@ class OpenVPNAuthenticator(object): def _find_connection(self, common_name): with open(OPENVPN_CONFIG, "r") as f: for row in csv.reader(f, dialect="unix"): - # Skip empty rows - if not row: + # Skip empty rows or rows that are too short + if not row or len(row) < 5: continue # Skip disabled connections -- 2.39.2