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

Skip to content

Commit 21c6b52

Browse files
committed
minor fix
1 parent 7751346 commit 21c6b52

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,11 +1097,14 @@ def __setHTTPExtraHeaders():
10971097
conf.headers = conf.headers.split("\n") if "\n" in conf.headers else conf.headers.split("\\n")
10981098

10991099
for headerValue in conf.headers:
1100-
if ":" in headerValue:
1100+
if headerValue.count(':') == 1:
11011101
header, value = (_.lstrip() for _ in headerValue.split(":"))
11021102

11031103
if header and value:
11041104
conf.httpHeaders.append((header, value))
1105+
else:
1106+
errMsg = "Invalid header value: %s" % repr(headerValue).lstrip('u')
1107+
raise sqlmapSyntaxException, errMsg
11051108

11061109
elif not conf.httpHeaders or len(conf.httpHeaders) == 1:
11071110
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))

0 commit comments

Comments
 (0)