Commit 1398ee26 authored by sim's avatar sim

[FIX] Configuration variables escaping

parent 569e7e58
...@@ -42,10 +42,11 @@ DB_USER=${DB_USER:-$DB_USER_DEFAULT} ...@@ -42,10 +42,11 @@ DB_USER=${DB_USER:-$DB_USER_DEFAULT}
read -s -p "Please provide the password for $DB_USER: " DB_PASS && echo read -s -p "Please provide the password for $DB_USER: " DB_PASS && echo
SECRET_KEY=$(echo -n "$SECRET_KEY" | sed -e 's/[\\\/&\"]/\\\\&/g') # Escape variables
DB_NAME=$(echo -n "$DB_NAME" | sed -e 's/[\\\/&\"]/\\\\&/g') SECRET_KEY=$(echo -n "$SECRET_KEY" | sed -e 's/[\/&\"]/\\&/g')
DB_USER=$(echo -n "$DB_USER" | sed -e 's/[\\\/&\"]/\\\\&/g') DB_NAME=$(echo -n "$DB_NAME" | sed -e 's/[\/&\"]/\\&/g')
DB_PASS=$(echo -n "$DB_PASS" | sed -e 's/[\\\/&\"]/\\\\&/g') DB_USER=$(echo -n "$DB_USER" | sed -e 's/[\/&\"]/\\&/g')
DB_PASS=$(echo -n "$DB_PASS" | sed -e 's/[\/&\"]/\\&/g')
echo "Generate configuration file from $TEMPLATE..." echo "Generate configuration file from $TEMPLATE..."
sed -E -e 's/[{]DEBUG[}]/True/g' \ sed -E -e 's/[{]DEBUG[}]/True/g' \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment