File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ if [[ "${INSTALL_WORDPRESS}" == "1" ]]; then
205205 database_password=" ${RAND_CHAR32} "
206206
207207 # Domain Database Credentials
208+ # No need to normalize database_user to lowercase as this is a Linux-only project that does not require windows compatibility.
208209 credentials_file=" /home/EngineScript/mysql-credentials/${DOMAIN} .txt"
209210 # Create the file with restrictive permissions before writing any sensitive data
210211 install -m 600 /dev/null " ${credentials_file} "
@@ -216,7 +217,7 @@ if [[ "${INSTALL_WORDPRESS}" == "1" ]]; then
216217 source " ${credentials_file} "
217218
218219 # Validate DB identifier before interpolating into SQL
219- if [[ -z " ${DB} " || ! " ${DB} " =~ ^[A-Za- z_][A-Za -z0-9_]* $ ]]; then
220+ if [[ -z " ${DB} " || ! " ${DB} " =~ ^[a- z_][a -z0-9_]* $ ]]; then
220221 echo " Error: Invalid database name '${DB} ' for domain '${DOMAIN} '." >&2
221222 exit 1
222223 fi
You can’t perform that action at this time.
0 commit comments