Skip to content

Commit 216383a

Browse files
committed
Quote password to avoid manipulating string
This change quotes the DB_ROOT_PASSWORD variable used in the mysql_wsrep_notify.sh script to ensure we don't glob or expand potential bash expressions Signed-off-by: Brendan Shephard <[email protected]>
1 parent ff694b3 commit 216383a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/galera/bin/mysql_wsrep_notify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function log_error() {
2828

2929
function mysql_get_status {
3030
local name=$1
31-
mysql -nNE -uroot -p$DB_ROOT_PASSWORD -e "show status like '${name}';" | tail -1
31+
mysql -nNE -uroot -p"${DB_ROOT_PASSWORD}" -e "show status like '${name}';" | tail -1
3232
if [ $? != 0 ]; then
3333
log_error "could not get value of mysql variable '${name}' (rc=$?)"
3434
return 1

0 commit comments

Comments
 (0)