From ebccba922b46fca38ca29e3541ade733f3008808 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 16 Oct 2013 11:25:26 +0200 Subject: [PATCH] Fix for an Issue #543 --- plugins/generic/users.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/generic/users.py b/plugins/generic/users.py index ca3b0594fb7..37b6be961d6 100644 --- a/plugins/generic/users.py +++ b/plugins/generic/users.py @@ -389,6 +389,9 @@ def getPrivileges(self, query2=False): else: privilege = value[count] + if privilege is None: + continue + # In PostgreSQL we get 1 if the privilege is # True, 0 otherwise if Backend.isDbms(DBMS.PGSQL) and getUnicode(privilege).isdigit(): @@ -506,8 +509,12 @@ def getPrivileges(self, query2=False): query = rootQuery.blind.query % (index, user) else: query = rootQuery.blind.query % (user, index) + privilege = unArrayizeValue(inject.getValue(query, union=False, error=False)) + if privilege is None: + continue + # In PostgreSQL we get 1 if the privilege is True, # 0 otherwise if Backend.isDbms(DBMS.PGSQL) and ", " in privilege: