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

Unecesary complex stuff just to hash the password

This commit is contained in:
Alexandre Aubin 2023-12-04 19:42:20 +01:00 committed by Félix Piédallu
parent 12d53a22e3
commit 8c3c6b3992
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ ram.runtime = "50M"
main.url = "/"
[resources.apt]
packages = "mariadb-server, php8.2-mbstring, php8.2-bcmath, php8.2-iconv, php8.2-xml, php8.2-gd, php8.2-curl, php8.2-mysqli"
packages = "mariadb-server, php8.2-mbstring, php8.2-bcmath, php8.2-iconv, php8.2-xml, php8.2-gd, php8.2-curl, php8.2-mysqli, python3-bcrypt"
[resources.database]
type = "mysql"

View file

@ -42,7 +42,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Filling the database..."
version=$(ynh_app_upstream_version)
bcrypt_mdp="$(php $install_dir/mdphash.php $password)"
bcrypt_mdp=$(python3 -c 'import bcrypt, sys; print(bcrypt.hashpw(sys.stdin.read().strip().encode(), bcrypt.gensalt(rounds=10)).decode())' <<< "$password")
timezone="$(cat /etc/timezone)"
time="$(date +%s)"