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.
This commit is contained in:
Henrique Moody 2016-10-27 15:28:41 +02:00 committed by GitHub
parent f88ce37923
commit 5a3873ece4

View file

@ -873,7 +873,7 @@ sub mysql_setup {
$mysqllogin = "-u $name"; $mysqllogin = "-u $name";
if ( length($password) > 0 ) { if ( length($password) > 0 ) {
$mysqllogin .= " -p\"$password\""; $mysqllogin .= " -p'$password'";
} }
$mysqllogin .= $remotestring; $mysqllogin .= $remotestring;
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`; my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;