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

Skip to content

Commit 596fff4

Browse files
committed
Fixes #4235
1 parent 56ff081 commit 596fff4

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.6.10"
21+
VERSION = "1.4.6.11"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

thirdparty/multipart/multipartpost.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import io
2424
import mimetypes
2525
import os
26+
import re
2627
import stat
2728
import sys
2829

@@ -67,6 +68,14 @@ def http_request(self, request):
6768
request.add_unredirected_header("Content-Type", contenttype)
6869

6970
request.data = data
71+
72+
# NOTE: https://github.com/sqlmapproject/sqlmap/issues/4235
73+
if request.data:
74+
for match in re.finditer(r"(?i)\s*-{20,}\w+(\s+Content-Disposition[^\n]+\s+|\-\-\s*)", request.data):
75+
part = match.group(0)
76+
if '\r' not in part:
77+
request.data = request.data.replace(part, part.replace("\n", "\r\n"))
78+
7079
return request
7180

7281
def multipart_encode(self, vars, files, boundary=None, buf=None):

0 commit comments

Comments
 (0)