summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/vpn_openconnect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/vpn_openconnect.py b/src/conf_mode/vpn_openconnect.py
index 421ac6997..08e4fc6db 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -91,7 +91,7 @@ def verify(ocserv):
if not ocserv["authentication"]['radius']['server']:
raise ConfigError('Openconnect authentication mode radius requires at least one RADIUS server')
if "local" in ocserv["authentication"]["mode"]:
- if not ocserv["authentication"]["local_users"]:
+ if not ocserv.get("authentication", {}).get("local_users"):
raise ConfigError('openconnect mode local required at least one user')
if not ocserv["authentication"]["local_users"]["username"]:
raise ConfigError('openconnect mode local required at least one user')