summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_openconnect.py
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-12-04 13:29:00 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-12-04 13:29:00 +0000
commit7ce6ad4486912dc76c5999f420897efe2747cabb (patch)
tree2e893561509b454988d0a890f661032fe51ff344 /src/conf_mode/vpn_openconnect.py
parent1804f1cb1a9026fe07b49f5d65460875423534bc (diff)
downloadvyos-1x-7ce6ad4486912dc76c5999f420897efe2747cabb.tar.gz
vyos-1x-7ce6ad4486912dc76c5999f420897efe2747cabb.zip
T4860: Verify if mode in openconnect ocserv dict
openconnect authentication mode must be set check dict that 'mode' exists in openconnect authentication
Diffstat (limited to 'src/conf_mode/vpn_openconnect.py')
-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 c050b796b..845250dd4 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -58,7 +58,7 @@ def get_config():
default_values = defaults(base)
ocserv = dict_merge(default_values, ocserv)
- if "local" in ocserv["authentication"]["mode"]:
+ if 'mode' in ocserv["authentication"] and "local" in ocserv["authentication"]["mode"]:
# workaround a "know limitation" - https://phabricator.vyos.net/T2665
del ocserv['authentication']['local_users']['username']['otp']
if not ocserv["authentication"]["local_users"]["username"]: