Use openssl rand to generate password

It should be more secure than hashing the current time.
This commit is contained in:
Loïc Guitaut
2015-09-09 23:39:29 +02:00
parent ae26e2060c
commit db3763aa83

View File

@@ -26,7 +26,7 @@ case "$1" in
fi fi
mkdir -p "$SERVICE_ROOT" || dokku_log_fail "Unable to create service directory" mkdir -p "$SERVICE_ROOT" || dokku_log_fail "Unable to create service directory"
password=$(date +%s | sha256sum | base64 | head -c 16) password=$(openssl rand -hex 16)
echo "$password" > "$SERVICE_ROOT/PASSWORD" echo "$password" > "$SERVICE_ROOT/PASSWORD"
touch "$LINKS_FILE" touch "$LINKS_FILE"