mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-20 07:00:25 +00:00
Fix for --xpath over POST corrupting special characters (e.g. '+') in payloads
This commit is contained in:
parent
9d5259ff98
commit
ed8ad1ec77
2 changed files with 4 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.62"
|
||||
VERSION = "1.10.11.63"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ from lib.core.settings import XQUERY_HARVEST_CHARS
|
|||
from lib.core.settings import XQUERY_MAX_FILE_LENGTH
|
||||
from lib.request.connect import Connect as Request
|
||||
from lib.utils.xrange import xrange
|
||||
from thirdparty.six.moves.urllib.parse import quote as _quote
|
||||
|
||||
|
||||
SENTINEL = randomStr(length=10, lowercase=True)
|
||||
|
|
@ -154,7 +155,8 @@ def _send(place, parameter, value):
|
|||
time.sleep(conf.delay)
|
||||
|
||||
old_params = conf.parameters.get(place, "")
|
||||
conf.parameters[place] = _replaceSegment(place, parameter, value)
|
||||
# Note: POST body is sent as-is (i.e. raw '+', '&', '%' would be misinterpreted), while GET is URL encoded later on
|
||||
conf.parameters[place] = _replaceSegment(place, parameter, _quote(value, safe="") if place == PLACE.POST else value)
|
||||
|
||||
try:
|
||||
kwargs = {"raise404": False, "silent": True}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue