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:
parent
48435375a8
commit
085b9fefe5
1 changed files with 1 additions and 1 deletions
|
@ -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}')
|
||||
|
|
Loading…
Reference in a new issue