From f8c04ce020ae6684b9aa85a183eb51857640a29a Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 13 Jan 2011 20:59:13 +0000 Subject: [PATCH] Minor bug fix --- lib/controller/checks.py | 2 +- lib/core/common.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 95c0edfa4..6a9ff03d3 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -149,7 +149,7 @@ def checkSqlInjection(place, parameter, value): continue - if getErrorParsedDBMSes() and dbms not in getErrorParsedDBMSes() and kb.skipOthersDbms is None: + if len(getErrorParsedDBMSes()) > 0 and dbms not in getErrorParsedDBMSes() and kb.skipOthersDbms is None: msg = "parsed error message(s) showed that the " msg += "back-end DBMS could be '%s'. " % getErrorParsedDBMSesFormatted() msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]" diff --git a/lib/core/common.py b/lib/core/common.py index d2ac6354a..194230022 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -297,12 +297,10 @@ def getErrorParsedDBMSesFormatted(): htmlParsed = "" - if not kb.htmlFp: + if len(kb.htmlFp) == 0: return None - - if len(kb.htmlFp) == 1: - htmlVer = kb.htmlFp[0] - htmlParsed = htmlVer + elif len(kb.htmlFp) == 1: + htmlParsed = kb.htmlFp[0] elif len(kb.htmlFp) > 1: htmlParsed = " or ".join([htmlFp for htmlFp in kb.htmlFp]) @@ -2047,7 +2045,7 @@ def getIdentifiedDBMS(): dbms = kb.dbms elif conf.dbms is not None: dbms = conf.dbms - elif getErrorParsedDBMSes() is not None: + elif len(getErrorParsedDBMSes()) > 0: dbms = getErrorParsedDBMSes()[0] return aliasToDbmsEnum(dbms)