mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-17 13:35:18 +00:00
Fix for -r request files with multiple Cookie headers and HTTP/2 pseudo-headers
This commit is contained in:
parent
71907c80fe
commit
2530de4c1f
2 changed files with 6 additions and 2 deletions
|
|
@ -5793,6 +5793,10 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||
elif "?" in line and "=" in line and ": " not in line:
|
||||
params = True
|
||||
|
||||
# HTTP/2 pseudo-headers (e.g. ':authority')
|
||||
elif line.startswith(':'):
|
||||
continue
|
||||
|
||||
# Headers
|
||||
elif re.search(r"\A\S+:", line):
|
||||
key, value = line.split(":", 1)
|
||||
|
|
@ -5807,7 +5811,7 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||
|
||||
# Cookie and Host headers
|
||||
if key.upper() == HTTP_HEADER.COOKIE.upper():
|
||||
cookie = value
|
||||
cookie = "%s; %s" % (cookie, value) if cookie else value # Note: (e.g. HTTP/2) cookies can be split into multiple headers
|
||||
elif key.upper() == HTTP_HEADER.HOST.upper():
|
||||
if '://' in value:
|
||||
scheme, value = value.split('://')[:2]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue