1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shaarli_ynh.git synced 2024-09-03 20:26:10 +02:00

This sounds like a very convoluted way to generate a 40-char random string ...

This commit is contained in:
Alexandre Aubin 2023-12-21 15:13:24 +01:00
parent 48435375a8
commit 085b9fefe5

View file

@ -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}')