mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Bug fixes for search (safeStringFormat should not replace all if given scalar values)
This commit is contained in:
@@ -1374,9 +1374,9 @@ def safeStringFormat(format_, params):
|
||||
retVal = format_.replace("%d", "%s")
|
||||
|
||||
if isinstance(params, basestring):
|
||||
retVal = retVal.replace("%s", params)
|
||||
retVal = retVal.replace("%s", params, 1)
|
||||
elif not isListLike(params):
|
||||
retVal = retVal.replace("%s", str(params))
|
||||
retVal = retVal.replace("%s", str(params), 1)
|
||||
else:
|
||||
count, index = 0, 0
|
||||
while index != -1:
|
||||
|
||||
@@ -314,7 +314,7 @@ class Search:
|
||||
query = agent.limitQuery(index, query)
|
||||
|
||||
foundTbl = unArrayizeValue(inject.getValue(query, union=False, error=False))
|
||||
if not isNoneValue(foundTbls[db]):
|
||||
if not isNoneValue(foundTbl):
|
||||
kb.hintValue = foundTbl
|
||||
foundTbl = safeSQLIdentificatorNaming(foundTbl, True)
|
||||
foundTbls[db].append(foundTbl)
|
||||
|
||||
Reference in New Issue
Block a user