Fix granting privileges on a mysql host

In case current_user() reports a wildcard identification for the user's
host (e.g. user@%) the percent sign was not escaped causing sprintf
to complain as there were too few arguments in this case.

fixes #7853
This commit is contained in:
Johannes Meyer 2014-12-01 11:00:12 +01:00
parent 625fa4d738
commit 2b2b28915d
1 changed files with 1 additions and 1 deletions

View File

@ -486,7 +486,7 @@ class DbTool
'GRANT %%s ON %s.%%s TO %s@%s',
$this->quoteIdentifier($this->config['dbname']),
$this->quoteIdentifier($username),
$this->quoteIdentifier($host)
str_replace('%', '%%', $this->quoteIdentifier($host))
);
$dbPrivileges = array();