Change target of min pass length check to 'int' of pass length

Fixes default password min length check, crashing crafty on fresh install
This commit is contained in:
Zedifus 2024-03-03 01:10:48 +00:00
parent d58df77ad7
commit 8d08084ac2

View File

@ -24,7 +24,9 @@ class DatabaseBuilder:
"by Crafty. Find it in app/config/default-creds.txt"
)
username = default_data.get("username", "admin")
if self.helper.minimum_password_length > default_data.get("password", password):
if self.helper.minimum_password_length > len(
default_data.get("password", password)
):
Console.critical(
"Default password too short"
" using Crafty's created default."