From 5a3873ece4c69c3b27f37f4f14b15c450e944e21 Mon Sep 17 00:00:00 2001 From: Henrique Moody Date: Thu, 27 Oct 2016 15:28:41 +0200 Subject: [PATCH] Use single quotes around password Password may contain characters, like `$` and `!`, that may be interpreted by the shell. Prevent it to happen by using single quotes. --- mysqltuner.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 1628469..156dea2 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -873,7 +873,7 @@ sub mysql_setup { $mysqllogin = "-u $name"; if ( length($password) > 0 ) { - $mysqllogin .= " -p\"$password\""; + $mysqllogin .= " -p'$password'"; } $mysqllogin .= $remotestring; my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;