Merge pull request #570 from sysadmin75/mysql_user_parse_grant
Fix to revoke privileges for mysql user = ''
This commit is contained in:
commit
fa5a72f40e
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,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(", ")
|
||||
|
|
Loading…
Add table
Reference in a new issue