From 091d93d32f9124fc45b657c51d3b30c41f0d77bf Mon Sep 17 00:00:00 2001 From: Bailetti Tommaso Date: Tue, 7 Jan 2025 10:30:33 +0100 Subject: [PATCH] fix(migration): resolved issue where key or certificate were missing (#996) --- packages/ns-migration/files/scripts/openvpn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ns-migration/files/scripts/openvpn b/packages/ns-migration/files/scripts/openvpn index 5123d161b..27d083543 100755 --- a/packages/ns-migration/files/scripts/openvpn +++ b/packages/ns-migration/files/scripts/openvpn @@ -175,6 +175,9 @@ elif data['rw']['auth'] == 'certificate-otp': # Create user entries for user in data["users"]: + if user['key'] is None or user['crt'] is None: + nsmigration.vprint(f"Skipping OpenVPN Road Warrior user {user['name']}, missing key or certificate") + continue sname = utils.get_random_id() nsmigration.vprint(f"Creating OpenVPN Road Warrior user {user['name']}") u.set("users", sname, "user")