Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
22.08.14, 23.02.11, 23.08.7, 24.02.3, 24.08.0
-
None
-
MXS-SPRINT-222
Description
Username and password were not quoted in the mariabackup remote command. This meant that any character with special shell handling would cause the command to fail. The fix passes the username and password in single quotes, e.g. --user='maxscale'. This should handle most special characters correctly. Single quotes themselves are still not supported inside usernames and passwords.
Original description:
If the maxscale user has a bracket in the password - ( or ) then the async-rebuild-server command fails with the following error:
2024-10-17 04:52:13.915 error : [mariadbmon] (serve_backup): Failed to stream data from db1. Command 'sudo mariabackup --user=****** --password=****** --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr' stopped before data was streamed. Return value 2. Output: '' Error output: 'bash: -c: line 1: syntax error near unexpected token `)'\nbash: -c: line 1: `sudo mariabackup --user=maxscale --password=coiH7shaiDaichoh!) --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr'\n'
|
2024-10-17 04:52:13.915 error : [mariadbmon] (serve_backup): Failed to stream data from db1. Command 'sudo mariabackup --user=****** --password=****** --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr' stopped before data was streamed. Return value 2. Output: '' Error output: 'bash: -c: line 1: syntax error near unexpected token `)'\nbash: -c: line 1: `sudo mariabackup --user=maxscale --password=coiH7shaiDaichoh!) --backup --safe-slave-backup --target-dir=/tmp --stream=xbstream --parallel=1 | pigz -c | socat - TCP-LISTEN:4444,reuseaddr'\n'
|
I have tried to enclose the password in quotes within the maxscale.cnf to no avail.
In this test, the maxscale user password is coiH7shaiDaichoh!), note that if the password is set to coiH7shaiDaichoh! it doesn't throw the same error. It seems that only certain symbols have issues.