Fix to revoke privileges for mysql user = '' Issue #9848

pull/18777/head
sysadmin75 10 years ago committed by Matt Clay
parent 426ec96ea5
commit 9bd58bd224

@ -289,7 +289,7 @@ def privileges_get(cursor, user,host):
return x return x
for grant in grants: 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: if res is None:
raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0]) raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0])
privileges = res.group(1).split(", ") privileges = res.group(1).split(", ")

Loading…
Cancel
Save