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

Skip to content

Commit df73be3

Browse files
committed
Fix for an Issue #876
1 parent 725c3a6 commit df73be3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/request/connect.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,10 @@ def _adjustParameter(paramString, parameter, newValue):
767767
if headers and "text/plain" in headers.get(HTTP_HEADER.CONTENT_TYPE, ""):
768768
token = page
769769

770-
if not token and any(cookie.name == conf.csrfToken for cookie in conf.cj):
771-
for cookie in conf.cj:
772-
if cookie.name == conf.csrfToken:
773-
token = cookie.value
770+
if not token and any(_.name == conf.csrfToken for _ in conf.cj):
771+
for _ in conf.cj:
772+
if _.name == conf.csrfToken:
773+
token = _.value
774774
if not any (conf.csrfToken in _ for _ in (conf.paramDict.get(PLACE.GET, {}), conf.paramDict.get(PLACE.POST, {}))):
775775
if post:
776776
post = "%s%s%s=%s" % (post, conf.paramDel or DEFAULT_GET_POST_DELIMITER, conf.csrfToken, token)

0 commit comments

Comments
 (0)