Skip to content

Commit 1230e57

Browse files
committed
Fixes #5434
1 parent ee15749 commit 1230e57

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/core/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

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

lib/request/connect.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def getPage(**kwargs):
441441
requestMsg += " %s" % _http_client.HTTPConnection._http_vsn_str
442442

443443
# Prepare HTTP headers
444-
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: host}, base=None if target else {})
444+
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: getHostHeader(url)}, base=None if target else {})
445445

446446
if HTTP_HEADER.COOKIE in headers:
447447
cookie = headers[HTTP_HEADER.COOKIE]
@@ -453,9 +453,6 @@ def getPage(**kwargs):
453453
headers[HTTP_HEADER.PROXY_AUTHORIZATION] = kb.proxyAuthHeader
454454

455455
if not conf.requestFile or not target:
456-
if not getHeader(headers, HTTP_HEADER.HOST):
457-
headers[HTTP_HEADER.HOST] = getHostHeader(url)
458-
459456
if not getHeader(headers, HTTP_HEADER.ACCEPT):
460457
headers[HTTP_HEADER.ACCEPT] = HTTP_ACCEPT_HEADER_VALUE
461458

0 commit comments

Comments
 (0)