mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
Minor bug fixes to --privileges for PostgreSQL query (corner case)
This commit is contained in:
parent
1879a49506
commit
74ef1e53c7
|
@ -389,7 +389,7 @@ class Agent:
|
||||||
fieldsToCastStr = fieldsNoSelect
|
fieldsToCastStr = fieldsNoSelect
|
||||||
|
|
||||||
# Function
|
# Function
|
||||||
if re.search("\A\w+\(.*\)", fieldsToCastStr, re.I) or fieldsSelectCase or fieldsSubstr:
|
if re.search("\A\w+\(.*\)", fieldsToCastStr, re.I) or (fieldsSelectCase and "WHEN use" not in query) or fieldsSubstr:
|
||||||
fieldsToCastList = [fieldsToCastStr]
|
fieldsToCastList = [fieldsToCastStr]
|
||||||
else:
|
else:
|
||||||
fieldsToCastList = fieldsToCastStr.replace(", ", ",")
|
fieldsToCastList = fieldsToCastStr.replace(", ", ",")
|
||||||
|
|
|
@ -587,7 +587,7 @@ class Enumeration:
|
||||||
|
|
||||||
for priv in privs:
|
for priv in privs:
|
||||||
if priv.isdigit() and int(priv) == 1:
|
if priv.isdigit() and int(priv) == 1:
|
||||||
for position, pgsqlPriv in pgsqlPrivs:
|
for position, pgsqlPriv in pgsqlPrivs.items():
|
||||||
if position == i:
|
if position == i:
|
||||||
privileges.add(pgsqlPriv)
|
privileges.add(pgsqlPriv)
|
||||||
|
|
||||||
|
@ -607,7 +607,7 @@ class Enumeration:
|
||||||
|
|
||||||
for priv in privs:
|
for priv in privs:
|
||||||
if priv.upper() == "Y":
|
if priv.upper() == "Y":
|
||||||
for position, mysqlPriv in mysqlPrivs:
|
for position, mysqlPriv in mysqlPrivs.items():
|
||||||
if position == i:
|
if position == i:
|
||||||
privileges.add(mysqlPriv)
|
privileges.add(mysqlPriv)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user