summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <kim@sentrium.io>2021-09-03 03:23:28 -0500
committerKim Hagen <kim@sentrium.io>2021-09-03 03:23:28 -0500
commit65b55f35f836185ffbf589c5ea5a6ee89568957e (patch)
tree9874b4afc36219a3cffed008d5dabc6ada56e6ad
parente3c71af1466da42403fa23bc23e7e530df71c6c8 (diff)
downloadvyos-1x-65b55f35f836185ffbf589c5ea5a6ee89568957e.tar.gz
vyos-1x-65b55f35f836185ffbf589c5ea5a6ee89568957e.zip
fix file location and use correct variable
-rw-r--r--data/templates/openvpn/server.conf.tmpl2
-rwxr-xr-xsrc/conf_mode/interfaces-openvpn.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/openvpn/server.conf.tmpl b/data/templates/openvpn/server.conf.tmpl
index 4c5dbc2c5..e6dd9fcbc 100644
--- a/data/templates/openvpn/server.conf.tmpl
+++ b/data/templates/openvpn/server.conf.tmpl
@@ -133,7 +133,7 @@ plugin "/usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-otp.so" "otp_secrets=/
{{- server['2fa']['totp']['t0']|default(0) }} totp_step=
{{- server['2fa']['totp']['step']|default(30) }} totp_digits=
{{- server['2fa']['totp']['digits']|default(6)}} password_is_cr=
-{%-if server['2fa']['totp']['challenge']|default('enabled') == 'enabled' %}1{% else %}0{% endif %}"
+{%-if server['2fa']['totp']['challenge']|default('enable') == 'enable' %}1{% else %}0{% endif %}"
{% endif %}
{% endif %}
{% else %}
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py
index 194126a34..365d0982e 100755
--- a/src/conf_mode/interfaces-openvpn.py
+++ b/src/conf_mode/interfaces-openvpn.py
@@ -381,7 +381,7 @@ def verify(openvpn):
for client in (dict_search('server.client', openvpn) or []):
exists = None
for ovpn_user in ovpn_users:
- if re.search('^' + client + ' ', user):
+ if re.search('^' + client + ' ', ovpn_user):
fp.write(ovpn_user)
exists = 'true'