Working on a bug (fix for Partial UNION query SQL injection technique

both Oracle and Microsoft SQL Server).
This commit is contained in:
Bernardo Damele 2008-12-22 00:51:09 +00:00
parent 2f406b3e56
commit 04c187c66a

View File

@ -456,7 +456,10 @@ class Agent:
# TODO: fix for Partial UNION query SQL injection technique both
# Oracle and Microsoft SQL Server
elif kb.dbms == "Oracle":
if query.startswith("SELECT "):
limitedQuery = "%s FROM (%s, %s" % (untilFrom, untilFrom, limitStr)
else:
limitedQuery = "%s FROM (SELECT %s, %s" % (untilFrom, ", ".join(field for field in fieldsList), limitStr)
limitedQuery = limitedQuery % fromFrom
limitedQuery += "=%d" % (num + 1)