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

Skip to content

Commit 935cb9c

Browse files
committed
Patch for a custom header cookie urlencoding
1 parent 17a4dda commit 935cb9c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.104"
22+
VERSION = "1.0.5.105"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
793793
value = agent.replacePayload(value, payload)
794794
else:
795795
# GET, POST, URI and Cookie payload needs to be thoroughly URL encoded
796-
if place in (PLACE.GET, PLACE.URI, PLACE.COOKIE) and not conf.skipUrlEncode or place in (PLACE.POST, PLACE.CUSTOM_POST) and kb.postUrlEncode:
796+
if (place in (PLACE.GET, PLACE.URI, PLACE.COOKIE) or place == PLACE.CUSTOM_HEADER and value.split(',')[0] == HTTP_HEADER.COOKIE) and not conf.skipUrlEncode or place in (PLACE.POST, PLACE.CUSTOM_POST) and kb.postUrlEncode:
797797
payload = urlencode(payload, '%', False, place != PLACE.URI) # spaceplus is handled down below
798798
value = agent.replacePayload(value, payload)
799799

0 commit comments

Comments
 (0)