From: Michael Tremer Date: Tue, 14 Jun 2022 15:53:19 +0000 (+0000) Subject: openvpn-authenticator: Don't process configuration when row is too short X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=770a60659b0378eb630dd7e41c081a4f3ff37165 openvpn-authenticator: Don't process configuration when row is too short Signed-off-by: Michael Tremer --- diff --git a/config/ovpn/openvpn-authenticator b/config/ovpn/openvpn-authenticator index 67fb72085..5773fb40b 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