Skip to content

Commit

Permalink
Fix for an Issue sqlmapproject#543
Browse files Browse the repository at this point in the history
  • Loading branch information
stamparm committed Oct 16, 2013
1 parent 72c79a4 commit ebccba9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/generic/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ebccba9

Please sign in to comment.