From 9c3cf60592d99494903184c268581dd18cf5b353 Mon Sep 17 00:00:00 2001 From: JustAMacUser Date: Tue, 21 Apr 2020 21:10:32 -0400 Subject: More fixes when installer generates config file. * Use single quotes in config.php when when defining database values so PHP doesn't interpret `$` as a variable (mostly for the password constant). * Use `addcslashes` instead of `addslashes` and only escape backslash and single quotes. * Do not convert DB_PORT to integer if leaving it blank (the default). --- config.php-dist | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100755 => 100644 config.php-dist (limited to 'config.php-dist') diff --git a/config.php-dist b/config.php-dist old mode 100755 new mode 100644 index e83fdcfdc..824c378a7 --- a/config.php-dist +++ b/config.php-dist @@ -3,11 +3,11 @@ // *** Database configuration (important!) *** // ******************************************* - define('DB_TYPE', "%DB_TYPE"); // pgsql or mysql - define('DB_HOST', "%DB_HOST"); - define('DB_USER', "%DB_USER"); - define('DB_NAME', "%DB_NAME"); - define('DB_PASS', "%DB_PASS"); + define('DB_TYPE', '%DB_TYPE'); // pgsql or mysql + define('DB_HOST', '%DB_HOST'); + define('DB_USER', '%DB_USER'); + define('DB_NAME', '%DB_NAME'); + define('DB_PASS', '%DB_PASS'); define('DB_PORT', '%DB_PORT'); // usually 5432 for PostgreSQL, 3306 for MySQL define('MYSQL_CHARSET', 'UTF8'); -- cgit v1.2.3