summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-02-06 17:48:19 +0100
committerGitHub <noreply@github.com>2024-02-06 17:48:19 +0100
commit341fe08465cc6c5882164cc5ae0174353a2a492b (patch)
tree2e96a7182b44f0d6070c7936f6257e2748625447 /src
parentda465d26b524fb26e0e9085e80a3ccaa6435eaa9 (diff)
parent71644dfed63f6248525db3c3bc9493c059707a2a (diff)
downloadvyos-1x-341fe08465cc6c5882164cc5ae0174353a2a492b.tar.gz
vyos-1x-341fe08465cc6c5882164cc5ae0174353a2a492b.zip
Merge pull request #2946 from sever-sever/T5921
T5921: Fix OpenConnect verify for local users
Diffstat (limited to 'src')
-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')