diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-11-26 00:06:45 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:50:50 +0200 |
commit | 0303e1e30c7746fee9c27180a9fb0a0065b14213 (patch) | |
tree | c5717271d25e61085e97e2a271317c843d1ff231 /lib/mysql_user | |
parent | 98f094ac5f59ad223f2dd930fc70c36059d631c8 (diff) |
Remove spaces in MySQL privileges strings.
In order to allow strings of the form:
priv="db.table1:SELECT, UPDATE,DELETE
/db.table2:SELECT,INSERT, DELETE"
Diffstat (limited to 'lib/mysql_user')
-rw-r--r-- | lib/mysql_user | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mysql_user b/lib/mysql_user index 602235a..64e1f3d 100644 --- a/lib/mysql_user +++ b/lib/mysql_user @@ -286,7 +286,7 @@ def privileges_unpack(priv): pieces[0][idx] = "`" + pieces[0][idx] + "`" pieces[0] = '.'.join(pieces[0]) - output[pieces[0]] = pieces[1].upper().split(',') + output[pieces[0]] = [ g.strip() for g in pieces[1].upper().split(',') ] if '*.*' not in output: output['*.*'] = ['USAGE'] |