froxlor / Froxlor

The server administration software for your needs - The official Froxlor development Git repository
http://www.froxlor.org
GNU General Public License v2.0
1.63k stars 458 forks source link

MySQL-Database-Password for froxroot working on CLI does not work in Installer #1203

Closed datenfalke closed 10 months ago

datenfalke commented 10 months ago

Describe the bug

I have started the Froxlor installation via Debian repo on a fresh Debian machine according to the instructions https://docs.froxlor.org/latest/general/installation/apt-package.html and immediately fail when entering the DB access data.

Via CLI "mysql -u froxroot -p" I get logged in with the password I created. But the installer does not: "SQLSTATE[HY000] [1045] Access denied for user 'froxroot'@'localhost' (using password: YES)"

I have tested it several times - now I have changed to a password generated without special characters.

The not working password for froxroot in the Installer is: q<&>O46t&N}/F#2}1wATVF

A password without special characters is working.

Possibly an error in the special characters escaping function used in Froxlor?

System information

d00p commented 10 months ago

Could you check whether the following patch resolves the issue?

diff --git a/lib/Froxlor/PhpHelper.php b/lib/Froxlor/PhpHelper.php
index 7e08e2b5..8a466cf0 100644
--- a/lib/Froxlor/PhpHelper.php
+++ b/lib/Froxlor/PhpHelper.php
@@ -458,6 +458,10 @@ class PhpHelper
                        'directory_password',
                        'ftp_password',
                        'mysql_password',
+                       'mysql_root_pass',
+                       'mysql_unprivileged_pass',
+                       'admin_pass',
+                       'admin_pass_confirm',
                ];
                if (!empty($global)) {
                        $tmp = $global;