Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to audit the database if database password contains a bracket #4927

Closed
bmfmancini opened this issue Sep 21, 2022 · 0 comments
Closed
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@bmfmancini
Copy link
Member

When running the audit_database.php script the script will appear to run however the MySQL commands actually fails and the audit schema does not load

tested on other installs it works just fine but if there is a } in the cacti password it fails
If I remove

-p from the below block and enter the db password when prompted it works just fine
when I test the login at the cli I need to wrap the password in single quotes

                if (file_exists($config['base_path'] . '/docs/audit_schema.sql')) {
                        exec('mysql' .
                                ' -u' . $database_username .
                                ' -p' . $database_password .
                                ' -h' . $database_hostname .
                                ' -P' . $database_port .
                                ' ' . $database_default .
                                ' < ' . $config['base_path'] . '/docs/audit_schema.sql', $output, $

sh: -c: line 0: syntax error near unexpected token )' sh: -c: line 0: mysql -ucacti -p -hlocalhost -P3306 cacti < /var/www/html/cacti/docs/audit_schema.sql'
FATAL: Failed Load the Audit Schema

@bmfmancini bmfmancini added bug Undesired behaviour unverified Some days we don't have a clue labels Sep 21, 2022
TheWitness added a commit that referenced this issue Sep 24, 2022
When running audit_database.php script will fail if cacti password had a ) in it
@TheWitness TheWitness added this to the v1.2.23 milestone Sep 24, 2022
@TheWitness TheWitness added resolved A fixed issue confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Sep 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2022
@netniV netniV changed the title [1.2.20] - when running audit_database.php script will fail if cacti password had a ) in it Unable to audit the database if database password contains a bracket Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants