mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 04:22:58 +02:00
openvpn-authenticator: Don't process configuration when row is too short
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user