Skip to content
Snippets Groups Projects
Commit f16968b4 authored by Bob Mottram's avatar Bob Mottram
Browse files

Fix lychee hashed strings

parent 241a4d9b
No related branches found
No related tags found
No related merge requests found
......@@ -71,10 +71,9 @@ function lychee_hashed_string {
echo ' }';
echo '}';
echo "\$salt = sprintf(\"\$2a\$%02d\$\", \$cost) . \$salt;";
echo "echo crypt('LYCHEE_STRING', \$salt);"; } > /tmp/lychee_string.php
echo "echo crypt('$lycheestr', \$salt);"; } > /root/.lychee_string.php
php_str=$(echo /tmp/lychee_string.php | sed "s|LYCHEE_STRING|$lycheestr|g")
php -r "$php_str"
php /root/.lychee_string.php
}
function logging_on_lychee {
......@@ -417,6 +416,7 @@ function lychee_run_installation {
lychee_identifier=$(php -r "echo md5(microtime(true));")
username_encrypted=$(lychee_hashed_string "root")
password_encrypted=$(lychee_hashed_string "$LYCHEE_ADMIN_PASSWORD")
rm /root/.lychee_string.php
sed -i 's|?|lychee_log|g' log_table.sql
initialise_database lychee log_table.sql
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment