From dac386735aab080ee23ef2d01be3cea19a2144e9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 8 Jun 2014 12:34:12 +0200 Subject: [PATCH] Patch for an Issue #713 --- tamper/unmagicquotes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tamper/unmagicquotes.py b/tamper/unmagicquotes.py index e79db0fc9..6d1cf1e7a 100644 --- a/tamper/unmagicquotes.py +++ b/tamper/unmagicquotes.py @@ -44,7 +44,9 @@ def tamper(payload, **kwargs): continue if found: - retVal = re.sub("\s*(AND|OR)[\s(]+'[^']+'\s*(=|LIKE)\s*'.*", "", retVal) - retVal += "-- " + _ = re.sub("\s*(AND|OR)[\s(]+'[^']+'\s*(=|LIKE)\s*'.*", "", retVal) + if _ != retVal: + retVal = _ + retVal += "-- " return retVal