False positive with mysql_root warning

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Excalibur
Posts: 2
Joined: Wed Apr 02, 2025 4:19 pm

False positive with mysql_root warning

Post by Excalibur »

Script URL: HESK
Version of script: 3.5.3

I have deployed HESK to run by nginx under `nginx` user, with socket authorization in MariaDB. This means I have db_host == localhost, db_user == nginx, and db_pass empty. However, because of the check in admin/admin_settings_general.php, I'm always getting warned about MySQL login as root user, which is not possible.

I think that check should include db_user as well.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: False positive with mysql_root warning

Post by Klemen »

The warning actually appears if the database password is empty.

You can disable the warning by deleting this code from /admin/admin_settings_general.php

Code: Select all

            if (d.s_db_pass.value=='')
            {
                if (!confirm('<?php echo addslashes($hesklang['mysql_root']); ?>'))
                {
                    return false;
                }
            }
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Excalibur
Posts: 2
Joined: Wed Apr 02, 2025 4:19 pm

Re: False positive with mysql_root warning

Post by Excalibur »

Yes I understand the code. I'm just providing the feedback that the check seems a bit trigger happy, and produces some false positives. I think the condition can be tightened.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: False positive with mysql_root warning

Post by Klemen »

How would you recommend checking then against accounts with no password?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply