summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEsa Varemo <esa@kuivanto.fi>2020-07-22 16:45:43 +0300
committerEsa Varemo <esa@kuivanto.fi>2020-07-22 16:45:43 +0300
commit4e6fbf8b7ec70fd3e0b5da8dedb6ea3efba3ec12 (patch)
tree78ffc84ede83314105e31c53ed8ce755449384ec /src
parent12235d1a83988d63c933d4bf69127b0405592485 (diff)
downloadvyos-1x-4e6fbf8b7ec70fd3e0b5da8dedb6ea3efba3ec12.tar.gz
vyos-1x-4e6fbf8b7ec70fd3e0b5da8dedb6ea3efba3ec12.zip
T2725: Fix config parse for users without passwords
Fix for https://phabricator.vyos.net/T2725 T2492 / a07e22377ab83104ac925e13d1824f241f0f8d4a introduced a change which broke the initialization of the user dict. In case the config contained an user without an encrypted-password set, the property would be missing and the commit would crash with `KeyError: 'password_encrypted'`
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system-login.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py
index 93d4cc679..b1dd583b5 100755
--- a/src/conf_mode/system-login.py
+++ b/src/conf_mode/system-login.py
@@ -72,7 +72,7 @@ def get_config():
user = {
'name': username,
'password_plaintext': '',
- 'password_encred': '!',
+ 'password_encrypted': '!',
'public_keys': [],
'full_name': '',
'home_dir': '/home/' + username,