diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 793ef8166..af68d1733 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -181,6 +181,14 @@ def checkSqlInjection(place, parameter, value): logger.debug(debugMsg) continue + # Skip test if the user provided custom column + # range and this is not a custom UNION test + if conf.uCols is not None and hasattr(test.request, "columns") and test.request.columns != "[COLSTART]-[COLSTOP]": + debugMsg = "skipping test '%s' because custom " % title + debugMsg += "UNION columns range was provided" + logger.debug(debugMsg) + continue + infoMsg = "testing '%s'" % title logger.info(infoMsg) @@ -352,14 +360,6 @@ def checkSqlInjection(place, parameter, value): # test value for proper payload unescaping Backend.forceDbms(dbms) - # Skip test if the user provided custom column - # range and this is not a custom UNION test - if conf.uCols is not None and test.request.columns != "[COLSTART]-[COLSTOP]": - debugMsg = "skipping test '%s' because custom " % title - debugMsg += "UNION columns range was provided" - logger.debug(debugMsg) - continue - configUnion(test.request.char, test.request.columns) if not Backend.getIdentifiedDbms():