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

Skip to content

Commit 47a42c2

Browse files
committed
Fixes #1459
1 parent ecef769 commit 47a42c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/core/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ def cleanupPayload(self, payload, origValue=None):
308308
for _ in set(re.findall(r"\[RANDSTR(?:\d+)?\]", payload, re.I)):
309309
payload = payload.replace(_, randomStr())
310310

311-
if origValue is not None:
312-
payload = payload.replace("[ORIGVALUE]", origValue if origValue.isdigit() else unescaper.escape("'%s'" % origValue))
311+
if origValue is not None and "[ORIGVALUE]" in payload:
312+
payload = getUnicode(payload).replace("[ORIGVALUE]", origValue if origValue.isdigit() else unescaper.escape("'%s'" % origValue))
313313

314314
if "[INFERENCE]" in payload:
315315
if Backend.getIdentifiedDbms() is not None:

0 commit comments

Comments
 (0)