mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 13:02:35 +02:00
fix password salt
This commit is contained in:
@@ -24,7 +24,7 @@ hashedPasswordSalt=""
|
|||||||
hashedPasswordStoragePath="/mnt/hdd/app-data/passwords"
|
hashedPasswordStoragePath="/mnt/hdd/app-data/passwords"
|
||||||
if [ $(df | grep -c "/mnt/hdd") -gt 0 ]; then
|
if [ $(df | grep -c "/mnt/hdd") -gt 0 ]; then
|
||||||
# check if path & salt file exists
|
# check if path & salt file exists
|
||||||
if [ $(ls ${hashedPasswordStoragePath}/salt.txt grep -c "salt.txt") -eq 0 ]; then
|
if [ $(ls ${hashedPasswordStoragePath}/salt.txt | grep -c "salt.txt") -eq 0 ]; then
|
||||||
echo "# creating salt & hashedPasswordStoragePath ..."
|
echo "# creating salt & hashedPasswordStoragePath ..."
|
||||||
mkdir -p ${hashedPasswordStoragePath}
|
mkdir -p ${hashedPasswordStoragePath}
|
||||||
echo "$RANDOM-$(date +%N)" | shasum -a 512 | cut -d " " -f1 | cut -c 1-16 > ${hashedPasswordStoragePath}/salt.txt
|
echo "$RANDOM-$(date +%N)" | shasum -a 512 | cut -d " " -f1 | cut -c 1-16 > ${hashedPasswordStoragePath}/salt.txt
|
||||||
|
Reference in New Issue
Block a user