Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7751346 commit 21c6b52Copy full SHA for 21c6b52
1 file changed
lib/core/option.py
@@ -1097,11 +1097,14 @@ def __setHTTPExtraHeaders():
1097
conf.headers = conf.headers.split("\n") if "\n" in conf.headers else conf.headers.split("\\n")
1098
1099
for headerValue in conf.headers:
1100
- if ":" in headerValue:
+ if headerValue.count(':') == 1:
1101
header, value = (_.lstrip() for _ in headerValue.split(":"))
1102
1103
if header and value:
1104
conf.httpHeaders.append((header, value))
1105
+ else:
1106
+ errMsg = "Invalid header value: %s" % repr(headerValue).lstrip('u')
1107
+ raise sqlmapSyntaxException, errMsg
1108
1109
elif not conf.httpHeaders or len(conf.httpHeaders) == 1:
1110
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))
0 commit comments