From 11132ba993def83f3ca341c79dc13787f7d1fe54 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 19 Mar 2012 14:28:18 +0000 Subject: [PATCH] fix for a bug in reflection removal mechanism --- lib/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 94f32d157..0d3929971 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2680,7 +2680,7 @@ def removeReflectiveValues(content, payload, suppressWarning=False): while 2 * REFLECTED_NON_ALPHA_NUM_REGEX in regex: regex = regex.replace(2 * REFLECTED_NON_ALPHA_NUM_REGEX, REFLECTED_NON_ALPHA_NUM_REGEX) - if all(part.lower() in content.lower() for part in regex.split(REFLECTED_NON_ALPHA_NUM_REGEX)): # fast optimization check + if all(part.lower() in content.lower() for part in regex.strip('\\b').split(REFLECTED_NON_ALPHA_NUM_REGEX)): # fast optimization check parts = regex.split(REFLECTED_NON_ALPHA_NUM_REGEX) if len(parts) > REFLECTED_MAX_REGEX_PARTS: # preventing CPU hogs regex = "%s.+?%s" % (REFLECTED_NON_ALPHA_NUM_REGEX.join(parts[:REFLECTED_MAX_REGEX_PARTS / 2]), REFLECTED_NON_ALPHA_NUM_REGEX.join(parts[-REFLECTED_MAX_REGEX_PARTS / 2:]))