mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Patch for an Issue #1578
This commit is contained in:
@@ -343,6 +343,9 @@ class Connect(object):
|
||||
# Prepare HTTP headers
|
||||
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: host})
|
||||
|
||||
if HTTP_HEADER.COOKIE in headers:
|
||||
cookie = headers[HTTP_HEADER.COOKIE]
|
||||
|
||||
if kb.authHeader:
|
||||
headers[HTTP_HEADER.AUTHORIZATION] = kb.authHeader
|
||||
|
||||
@@ -370,6 +373,12 @@ class Connect(object):
|
||||
if boundary:
|
||||
headers[HTTP_HEADER.CONTENT_TYPE] = "%s; boundary=%s" % (headers[HTTP_HEADER.CONTENT_TYPE], boundary)
|
||||
|
||||
# Reset header values to original in case of provided request file
|
||||
if target and conf.requestFile:
|
||||
headers = OrderedDict(conf.httpHeaders)
|
||||
if cookie:
|
||||
headers[HTTP_HEADER.COOKIE] = cookie
|
||||
|
||||
if auxHeaders:
|
||||
for key, value in auxHeaders.items():
|
||||
for _ in headers.keys():
|
||||
|
||||
Reference in New Issue
Block a user