From 2220be97b14fdc069f1a7b80c193a060ed815b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 19 Nov 2019 20:29:11 +0100 Subject: [PATCH] Make more strong secret detection --- scripts/install | 6 +++--- scripts/upgrade | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 659a9da..f77bb81 100644 --- a/scripts/install +++ b/scripts/install @@ -220,9 +220,9 @@ deactivate # Get random values from config ynh_print_OFF -registration_shared_secret=$(egrep "^registration_shared_secret" homeserver.yml | cut -d'"' -f2) -form_secret=$(egrep "^form_secret" homeserver.yml | cut -d'"' -f2) -macaroon_secret_key=$(egrep "^macaroon_secret_key" homeserver.yml | cut -d'"' -f2) +registration_shared_secret=$(egrep "^registration_shared_secret:" homeserver.yml | cut -d'"' -f2) +form_secret=$(egrep "^form_secret:" homeserver.yml | cut -d'"' -f2) +macaroon_secret_key=$(egrep "^macaroon_secret_key:" homeserver.yml | cut -d'"' -f2) # store in yunohost settings ynh_app_setting_set --app=$app --key=registration_shared_secret --value="$registration_shared_secret" diff --git a/scripts/upgrade b/scripts/upgrade index 7b70f47..46d12f9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -161,8 +161,8 @@ then # Get random values from config ynh_print_OFF - registration_shared_secret=$(egrep "^registration_shared_secret" homeserver.yml | cut -d'"' -f2) - form_secret=$(egrep "^form_secret" homeserver.yml | cut -d'"' -f2) + registration_shared_secret=$(egrep "^registration_shared_secret:" homeserver.yml | cut -d'"' -f2) + form_secret=$(egrep "^form_secret:" homeserver.yml | cut -d'"' -f2) # store in yunohost settings ynh_app_setting_set --app=$app --key=registration_shared_secret --value="$registration_shared_secret"