nagvis
nagvis copied to clipboard
Problem with special characters in dbpass
Hi,
i get the following error:
The attribute dbpass in section backend_icinga2 in main configuration file does not match the correct format. Please review your configuration.
I could narrow it down that a asterisk (*) is causing this message to appear. But since even special characters are a valid character in passwords nagvis should handle it. Otherwise there should at least be a information that (some) special characters are not allowed.
[backend_icinga2]
backendtype="ndomy"
dbhost="localhost"
dbport=3306
dbname="icinga"
dbuser="user"
dbpass="super*secret"
The regular expression used to match the password is this one: https://github.com/NagVis/nagvis/blob/142c26500192f18ef8b38a7aa7c69ebc49d8f183/share/server/core/defines/matches.php#L34
I just stumbled upon the same issue with the charater '
. I just tested *
, but it works. So your issue seems to be resolved. Now it is the character '
that is missing in the regular expression. Also the character "
should work. Because you can set it in the INI file like so:
dbpass = "I'm \"foobar\"."
This is valid entry.