mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
Simpler sha1 computation (#80)
* Simple sha1 computation * Auto-update README Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
parent
9c5fe175b1
commit
e323036007
3 changed files with 4 additions and 2 deletions
|
@ -32,6 +32,7 @@ Shaarli is a minimalist bookmark manager and link sharing service that you can i
|
||||||
|
|
||||||
**Shipped version:** 0.12.1~ynh4
|
**Shipped version:** 0.12.1~ynh4
|
||||||
|
|
||||||
|
|
||||||
**Demo:** https://demo.shaarli.org/
|
**Demo:** https://demo.shaarli.org/
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
|
@ -30,7 +30,8 @@ Shaarli is a minimalist bookmark manager and link sharing service that you can i
|
||||||
- feed other blogs, aggregators, social networks...
|
- feed other blogs, aggregators, social networks...
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.12.1~ynh4
|
**Version incluse :** 0.12.1~ynh4
|
||||||
|
|
||||||
|
|
||||||
**Démo :** https://demo.shaarli.org/
|
**Démo :** https://demo.shaarli.org/
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ timezone=$(cat /etc/timezone)
|
||||||
salt=$(php$phpversion -r 'echo sha1(uniqid("", true) ."_". mt_rand());')
|
salt=$(php$phpversion -r 'echo sha1(uniqid("", true) ."_". mt_rand());')
|
||||||
|
|
||||||
# Generate the hash with the password
|
# Generate the hash with the password
|
||||||
hash=$(php$phpversion -r "echo sha1('${password}'.'${admin}'.'${salt}');")
|
hash=$(echo -n "${password}${admin}${salt}" | sha1sum | awk '{print $1}')
|
||||||
|
|
||||||
# Generate the API secret
|
# Generate the API secret
|
||||||
secret=$(php${YNH_PHP_VERSION} -r "echo str_shuffle(substr(hash_hmac('sha512', uniqid('${salt}'), '${admin}'), 10, 12));")
|
secret=$(php${YNH_PHP_VERSION} -r "echo str_shuffle(substr(hash_hmac('sha512', uniqid('${salt}'), '${admin}'), 10, 12));")
|
||||||
|
|
Loading…
Add table
Reference in a new issue