Skip to content

Commit 823af33

Browse files
authored
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].
1 parent 02ba13b commit 823af33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snipeit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,15 +932,15 @@ case $setupmail in
932932

933933
echo -n " From name:"
934934
read -r mailfromname
935-
sed -i "s|^\\(MAIL_FROM_NAME=\\).*|\\1$mailfromname|" "$APP_PATH/.env"
935+
sed -i "s|^\\(MAIL_FROM_NAME=\\).*|\\1\\'$mailfromname\\'|" "$APP_PATH/.env"
936936

937937
echo -n " Reply to address:"
938938
read -r mailreplytoaddr
939939
sed -i "s|^\\(MAIL_REPLYTO_ADDR=\\).*|\\1$mailreplytoaddr|" "$APP_PATH/.env"
940940

941941
echo -n " Reply to name:"
942942
read -r mailreplytoname
943-
sed -i "s|^\\(MAIL_REPLYTO_NAME=\\).*|\\1$mailreplytoname|" "$APP_PATH/.env"
943+
sed -i "s|^\\(MAIL_REPLYTO_NAME=\\).*|\\1\\'$mailreplytoname\\'|" "$APP_PATH/.env"
944944
setupmail="yes"
945945
;;
946946
[nN] | [n|N][O|o] )

0 commit comments

Comments
 (0)