From c34f6e25b26498579d518f1a8d2cfac199723743 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 12 Feb 2013 17:01:47 +0100 Subject: [PATCH] Minor fix for --eval (urldecoded values should be used inside evaluation) --- lib/core/common.py | 2 +- lib/request/connect.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 57f34a254..d4289b646 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2025,7 +2025,7 @@ def urldecode(value, encoding=None, unsafe="%%&=;+%s" % CUSTOM_INJECTION_MARK_CH pass finally: if convall: - result = urllib.unquote_plus(value) + result = urllib.unquote_plus(value) if plusspace else urllib.unquote(value) else: def _(match): charset = reduce(lambda x, y: x.replace(y, ""), unsafe, string.printable) diff --git a/lib/request/connect.py b/lib/request/connect.py index 62b1cffa6..a35cf8b95 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -36,6 +36,7 @@ from lib.core.common import singleTimeWarnMessage from lib.core.common import stdev from lib.core.common import wasLastResponseDelayed from lib.core.common import unicodeencode +from lib.core.common import urldecode from lib.core.common import urlencode from lib.core.data import conf from lib.core.data import kb @@ -716,6 +717,7 @@ class Connect(object): for part in item.split(delimiter): if '=' in part: name, value = part.split('=', 1) + value = urldecode(value, convall=True, plusspace=(item==post and kb.postSpaceToPlus)) evaluateCode("%s=%s" % (name, repr(value)), variables) originals.update(variables)