Merge pull request #1036 from shr3kst3r/strip_spaces
Strip spaces around MySQL privileges before comparing to valid privileges
This commit is contained in:
commit
474b731bcc
1 changed files with 1 additions and 1 deletions
|
@ -323,7 +323,7 @@ def privileges_unpack(priv):
|
|||
dbpriv = pieces[0].rsplit(".", 1)
|
||||
pieces[0] = "`%s`.%s" % (dbpriv[0].strip('`'), dbpriv[1])
|
||||
|
||||
output[pieces[0]] = pieces[1].upper().split(',')
|
||||
output[pieces[0]] = map(lambda s: s.strip(), pieces[1].upper().split(','))
|
||||
new_privs = frozenset(output[pieces[0]])
|
||||
if not new_privs.issubset(VALID_PRIVS):
|
||||
raise InvalidPrivsError('Invalid privileges specified: %s' % new_privs.difference(VALID_PRIVS))
|
||||
|
|
Loading…
Reference in a new issue