nixys / nxs-backup

The tool for creating, delivering and rotating backups for GNU/Linux distributions.
https://nxs-backup.io
Apache License 2.0
256 stars 13 forks source link

Issue with Using # Symbol in Variable values inside nxs-config files #104

Open AndreiKozak opened 5 hours ago

AndreiKozak commented 5 hours ago

Description:

I encountered an issue when trying to use the # symbol in variable values. Specifically, when setting a password containing # (e.g., mysecret#password), the value is unexpectedly altered. Instead of using the intended string, the entire value is replaced with mysecret#password, breaking functionality. Even if I try to escape the # symbol using a backslash (e.g., mysecret#password), it still does not work as expected, and the value remains misinterpreted.

Steps to Reproduce:

Define a variable (e.g., password) with the value mysecret#password inside config file like /etc/nxs-backup/conf.d/mysql.conf )

Expected Behavior:

The # symbol should be treated as part of the value, not as a comment or special character, and the variable should retain its original value.

Actual Behavior:

The value is replaced or misinterpreted when the # symbol is included, resulting in incorrect behavior. 'Access denied for user 'user'@'localhost' (using password: YES)'