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: