mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-08 05:31:32 +00:00
Drei patch (Issue #4235)
This commit is contained in:
6
thirdparty/multipart/multipartpost.py
vendored
6
thirdparty/multipart/multipartpost.py
vendored
@@ -71,10 +71,10 @@ class MultipartPostHandler(_urllib.request.BaseHandler):
|
||||
|
||||
# NOTE: https://github.com/sqlmapproject/sqlmap/issues/4235
|
||||
if request.data:
|
||||
for match in re.finditer(r"(?i)\s*-{20,}\w+(\s+Content-Disposition[^\n]+\s+|\-\-\s*)", request.data):
|
||||
for match in re.finditer(b"(?i)\s*-{20,}\w+(\s+Content-Disposition[^\n]+\s+|\-\-\s*)", request.data):
|
||||
part = match.group(0)
|
||||
if '\r' not in part:
|
||||
request.data = request.data.replace(part, part.replace("\n", "\r\n"))
|
||||
if b'\r' not in part:
|
||||
request.data = request.data.replace(part, part.replace(b'\n', b"\r\n"))
|
||||
|
||||
return request
|
||||
|
||||
|
||||
Reference in New Issue
Block a user