Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dac3867

Browse files
committed
Patch for an Issue #713
1 parent 54be398 commit dac3867

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tamper/unmagicquotes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def tamper(payload, **kwargs):
4444
continue
4545

4646
if found:
47-
retVal = re.sub("\s*(AND|OR)[\s(]+'[^']+'\s*(=|LIKE)\s*'.*", "", retVal)
48-
retVal += "-- "
47+
_ = re.sub("\s*(AND|OR)[\s(]+'[^']+'\s*(=|LIKE)\s*'.*", "", retVal)
48+
if _ != retVal:
49+
retVal = _
50+
retVal += "-- "
4951

5052
return retVal

0 commit comments

Comments
 (0)