mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 02:19:04 +00:00
Rectify an HTTP digest authentication crash. Fixes #1665
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE][GH#1648] CR characters are no longer treated as illegal in script XML
|
||||
output. [nnposter]
|
||||
o [NSE][GH#1665] The HTTP library no longer crashes when code requests digest
|
||||
authentication but the server does not provide the necessary authentication
|
||||
header. [nnposter]
|
||||
|
||||
o [NSE][GH#1648] CR characters (0x0D) are no longer treated as illegal
|
||||
in script XML output. [nnposter]
|
||||
|
||||
o [GH#1659] Allow resuming nmap scan with lengthy command line
|
||||
[Clément Notin]
|
||||
|
||||
@@ -1404,7 +1404,7 @@ function generic_request(host, port, method, path, options)
|
||||
options_with_auth_removed["auth"] = nil
|
||||
local r = generic_request(host, port, method, path, options_with_auth_removed)
|
||||
local h = r.header['www-authenticate']
|
||||
if not r.status or (h and not string.find(h:lower(), "digest.-realm")) then
|
||||
if not (r.status and h and h:lower():find("digest.-realm")) then
|
||||
stdnse.debug1("http: the target doesn't support digest auth or there was an error during request.")
|
||||
return http_error("The target doesn't support digest auth or there was an error during request.")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user