Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1112019

Browse files
committed
Fixes #4131
1 parent 41bdb93 commit 1112019

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.3.4"
21+
VERSION = "1.4.3.5"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/generic/users.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def getPrivileges(self, query2=False):
450450
# In PostgreSQL we get 1 if the privilege is
451451
# True, 0 otherwise
452452
if Backend.isDbms(DBMS.PGSQL) and getUnicode(privilege).isdigit():
453-
if int(privilege) == 1:
453+
if int(privilege) == 1 and count in PGSQL_PRIVS:
454454
privileges.add(PGSQL_PRIVS[count])
455455

456456
# In MySQL >= 5.0 and Oracle we get the list
@@ -585,10 +585,8 @@ def getPrivileges(self, query2=False):
585585
i = 1
586586

587587
for priv in privs:
588-
if priv.isdigit() and int(priv) == 1:
589-
for position, pgsqlPriv in PGSQL_PRIVS.items():
590-
if position == i:
591-
privileges.add(pgsqlPriv)
588+
if priv.isdigit() and int(priv) == 1 and i in PGSQL_PRIVS:
589+
privileges.add(PGSQL_PRIVS[i])
592590

593591
i += 1
594592

0 commit comments

Comments
 (0)