Skip to content

Commit 12d32f5

Browse files
committed
fix for that SOAP reported bug
1 parent 1418ae9 commit 12d32f5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/request/connect.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -553,27 +553,27 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
553553

554554
logger.log(CUSTOM_LOGGING.PAYLOAD, safecharencode(payload))
555555

556-
if place == PLACE.COOKIE and conf.cookieUrlencode:
557-
value = agent.removePayloadDelimiters(value)
558-
value = urlEncodeCookieValues(value)
559-
560-
elif place:
561556
if place in (PLACE.GET, PLACE.POST, PLACE.URI, PLACE.CUSTOM_POST):
562557
# payloads in GET and/or POST need to be urlencoded
563558
# throughly without safe chars (especially & and =)
564559
# addendum: as we support url encoding in tampering
565560
# functions therefore we need to use % as a safe char
566561
if place != PLACE.URI or (value and payload and '?' in value and value.find('?') < value.find(payload)):
567-
payload = urlencode(payload, "%", False, True)
562+
payload = urlencode(payload, '%', False, True)
568563
value = agent.replacePayload(value, payload)
564+
569565
elif place == PLACE.SOAP:
570566
# payloads in SOAP should have chars > and < replaced
571567
# with their HTML encoded counterparts
572-
payload = payload.replace('>', '&gt;').replace('<', '&lt;')
568+
payload = payload.replace('>', "&gt;").replace('<', "&lt;")
573569
value = agent.replacePayload(value, payload)
574570

571+
if place:
575572
value = agent.removePayloadDelimiters(value)
576573

574+
if place == PLACE.COOKIE and conf.cookieUrlencode:
575+
value = urlEncodeCookieValues(value)
576+
577577
if conf.checkPayload:
578578
checkPayload(value)
579579

0 commit comments

Comments
 (0)