Use openssl rand to generate password
It should be more secure than hashing the current time.
This commit is contained in:
2
commands
2
commands
@@ -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"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user