Patch for negative logic (e.g. OR) cases (reported privately)

This commit is contained in:
Miroslav Stampar 2015-08-18 03:09:01 +02:00
parent 023def3203
commit 54d65328bc

View File

@ -77,7 +77,7 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
if page: if page:
# In case of an DBMS error page return None # In case of an DBMS error page return None
if kb.errorIsNone and (wasLastResponseDBMSError() or wasLastResponseHTTPError()): if kb.errorIsNone and (wasLastResponseDBMSError() or wasLastResponseHTTPError()) and not kb.negativeLogic:
return None return None
# Dynamic content lines to be excluded before comparison # Dynamic content lines to be excluded before comparison
@ -165,6 +165,9 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
elif ratio > UPPER_RATIO_BOUND: elif ratio > UPPER_RATIO_BOUND:
return True return True
elif ratio < LOWER_RATIO_BOUND:
return False
elif kb.matchRatio is None: elif kb.matchRatio is None:
return None return None