Fix to revoke privileges for mysql user = ''

Issue #9848
This commit is contained in:
sysadmin75 2014-12-25 17:36:51 -05:00
parent 170457413d
commit 00b4f4d543

View file

@ -254,7 +254,7 @@ def privileges_get(cursor, user,host):
return x
for grant in grants:
res = re.match("GRANT (.+) ON (.+) TO '.+'@'.+'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0])
res = re.match("GRANT (.+) ON (.+) TO '.*'@'.+'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0])
if res is None:
raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0])
privileges = res.group(1).split(", ")