diff --git a/lib/request/basic.py b/lib/request/basic.py index fe6e444d0..681bd228b 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -18,7 +18,6 @@ from lib.core.common import getCompiledRegex from lib.core.common import getUnicode from lib.core.common import isWindowsDriveLetterPath from lib.core.common import posixToNtSlashes -from lib.core.common import urlEncodeCookieValues from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger diff --git a/lib/request/connect.py b/lib/request/connect.py index 812f032b6..be0a33f58 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -20,6 +20,7 @@ from lib.core.agent import agent from lib.core.common import readInput from lib.core.common import getUnicode from lib.core.convert import urlencode +from lib.core.common import urlEncodeCookieValues from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger @@ -316,7 +317,10 @@ class Connect: value = agent.replacePayload(value, payload) - if place: + if place == "Cookie" and conf.cookieUrlencode: + value = agent.removePayloadDelimiters(value, False) + value = urlEncodeCookieValues(value) + elif place: value = agent.removePayloadDelimiters(value, toUrlencode[place]) if conf.checkPayload: