Patch for whitespace causing HTTP 500 errors.

Patch for whitespace causing HTTP 500 errors.
Patch that adds qoutes around MAIL_FROM_NAME and MAIL_REPLYTO_NAME as current script will generate a .env file which causes an 500 error preventing the site from loading.

Log File: /var/log/apache2/error.log:
The environment file is invalid!
Failed to parse dotenv file. Encountered unexpected whitespace at [Asset Management System].
This commit is contained in:
Darren Rainey 2024-11-13 20:58:36 +00:00 committed by GitHub
parent 02ba13be26
commit 823af33d1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -932,7 +932,7 @@ case $setupmail in
echo -n " From name:"
read -r mailfromname
sed -i "s|^\\(MAIL_FROM_NAME=\\).*|\\1$mailfromname|" "$APP_PATH/.env"
sed -i "s|^\\(MAIL_FROM_NAME=\\).*|\\1\\'$mailfromname\\'|" "$APP_PATH/.env"
echo -n " Reply to address:"
read -r mailreplytoaddr
@ -940,7 +940,7 @@ case $setupmail in
echo -n " Reply to name:"
read -r mailreplytoname
sed -i "s|^\\(MAIL_REPLYTO_NAME=\\).*|\\1$mailreplytoname|" "$APP_PATH/.env"
sed -i "s|^\\(MAIL_REPLYTO_NAME=\\).*|\\1\\'$mailreplytoname\\'|" "$APP_PATH/.env"
setupmail="yes"
;;
[nN] | [n|N][O|o] )