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