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

Skip to content

Commit 6a271fe

Browse files
committed
Update for an Issue #2
1 parent 998eb70 commit 6a271fe

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

lib/request/basic.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,13 @@ def processResponse(page, responseHeaders):
263263
if msg:
264264
logger.info("parsed error message: '%s'" % msg)
265265

266-
for regex in (EVENTVALIDATION_REGEX, VIEWSTATE_REGEX):
267-
match = re.search(regex, page, re.I)
268-
if match and PLACE.POST in conf.parameters:
269-
name, value = match.groups()
270-
conf.parameters[PLACE.POST] = re.sub("(?i)(%s=)[^&]+" % name, r"\g<1>%s" % value, conf.parameters[PLACE.POST])
271-
if PLACE.POST in conf.paramDict and name in conf.paramDict[PLACE.POST]:
272-
conf.paramDict[PLACE.POST][name] = value
266+
if kb.originalPage is None:
267+
for regex in (EVENTVALIDATION_REGEX, VIEWSTATE_REGEX):
268+
match = re.search(regex, page, re.I)
269+
if match and PLACE.POST in conf.parameters:
270+
name, value = match.groups()
271+
if PLACE.POST in conf.paramDict and name in conf.paramDict[PLACE.POST]:
272+
if conf.paramDict[PLACE.POST][name] in page:
273+
continue
274+
conf.paramDict[PLACE.POST][name] = value
275+
conf.parameters[PLACE.POST] = re.sub("(?i)(%s=)[^&]+" % name, r"\g<1>%s" % value, conf.parameters[PLACE.POST])

0 commit comments

Comments
 (0)