summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-11-26 00:06:45 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:50:50 +0200
commit0303e1e30c7746fee9c27180a9fb0a0065b14213 (patch)
treec5717271d25e61085e97e2a271317c843d1ff231
parent98f094ac5f59ad223f2dd930fc70c36059d631c8 (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"
-rw-r--r--lib/mysql_user2
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']