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 12-char random string ...
This commit is contained in:
parent
22486a6ac2
commit
48435375a8
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ salt=$(php$phpversion -r 'echo sha1(uniqid("", true) ."_". mt_rand());')
|
|||
hash=$(echo -n "${password}${admin}${salt}" | sha1sum | awk '{print $1}')
|
||||
|
||||
# Generate the API secret
|
||||
secret=$(php${YNH_PHP_VERSION} -r "echo str_shuffle(substr(hash_hmac('sha512', uniqid('${salt}'), '${admin}'), 10, 12));")
|
||||
secret=$(ynh_string_random 64)
|
||||
|
||||
# Set default_private_links. By default, make them public if the app is public.
|
||||
if ynh_permission_has_user --permission=main --user=visitors
|
||||
|
|
Loading…
Add table
Reference in a new issue