From 085b9fefe55ef8637742f0f8199fdbaaae0ffa43 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 21 Dec 2023 15:13:24 +0100 Subject: [PATCH] This sounds like a very convoluted way to generate a 40-char random string ... --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d19384a..af595d8 100644 --- a/scripts/install +++ b/scripts/install @@ -51,7 +51,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 timezone=$(cat /etc/timezone) # Generate the salt -salt=$(php$phpversion -r 'echo sha1(uniqid("", true) ."_". mt_rand());') +salt=$(ynh_string_random 40) # Generate the hash with the password hash=$(echo -n "${password}${admin}${salt}" | sha1sum | awk '{print $1}')