Fix for database names that contain colons

Bug fix: Permissions were not parsed correctly if the database name contains a colon (:) character. For example, a privilege string of "*.*:USAGE/`lnx-www-prod:wordpress`.*:ALL" would fail with "invalid privileges string: Invalid privileges specified: frozenset(['WORDPRESS`.*'])". This 1-line fix works around the problem.
pull/32877/head
dramaley 7 years ago committed by Brian Coca
parent f4f5c4d92a
commit 1fe608afbf

@ -478,7 +478,7 @@ def privileges_unpack(priv, mode):
output = {}
privs = []
for item in priv.strip().split('/'):
pieces = item.strip().split(':')
pieces = item.strip().rsplit(':', 1)
dbpriv = pieces[0].rsplit(".", 1)
# Do not escape if privilege is for database or table, i.e.
# neither quote *. nor .*

Loading…
Cancel
Save