summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authoroniko94 <onikolaiev94@outlook.com>2025-03-25 01:56:28 +0200
committeroniko94 <onikolaiev94@outlook.com>2025-03-25 10:50:58 +0200
commitd9ec5d1e70d3991ac64498734157cfb7934034ee (patch)
tree0590bbb887e163f72be35a54b466ed1024294e57 /src/op_mode
parent3fee8ec30dce8f3987fe468d29109ed4e1bc492a (diff)
downloadvyos-1x-d9ec5d1e70d3991ac64498734157cfb7934034ee.tar.gz
vyos-1x-d9ec5d1e70d3991ac64498734157cfb7934034ee.zip
T7278: Remove cracklib hack from postinstall script template
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/image_installer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index c6e9c7f6f..82756daec 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -783,6 +783,7 @@ def install_image() -> None:
break
print(MSG_WARN_IMAGE_NAME_WRONG)
+ failed_check_status = [EPasswdStrength.WEAK, EPasswdStrength.ERROR]
# ask for password
while True:
user_password: str = ask_input(MSG_INPUT_PASSWORD, no_echo=True,
@@ -792,7 +793,7 @@ def install_image() -> None:
Warning(MSG_WARN_CHANGE_PASSWORD)
else:
result = evaluate_strength(user_password)
- if result['strength'] == EPasswdStrength.WEAK:
+ if result['strength'] in failed_check_status:
Warning(result['error'])
confirm: str = ask_input(MSG_INPUT_PASSWORD_CONFIRM, no_echo=True,