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-Tag: v2.27-core170~61^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6f9fff2bcec35a98c4b01a4bab3038ee7813ee2;p=ipfire-2.x.git 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 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