From f93b31373a2099e82272657361a793c50ec9ec1b Mon Sep 17 00:00:00 2001 From: patrik Date: Mon, 19 Dec 2011 18:35:32 +0000 Subject: [PATCH] o [NSE] Fixed bug in the http library that would fail parsing authentication headers if no parameters were present. [Patrik] --- CHANGELOG | 3 +++ nselib/http.lua | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a1de6f399..b399396d1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE] Fixed bug in the http library that would fail parsing authentication + headers if no parameters were present. [Patrik] + o Added new fingerprints to http-enum for Subversion, CVS and Apache Archiva [Duarte Silva] diff --git a/nselib/http.lua b/nselib/http.lua index 7da349cab..8f075df79 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -1608,7 +1608,8 @@ local function read_auth_challenge(s, pos) tmp_pos = pos tmp_pos, name = read_token(s, tmp_pos) if not name then - return nil + pos = skip_space(s, pos + 1) + return pos, { scheme = scheme, params = nil } end tmp_pos = skip_space(s, tmp_pos) if string.sub(s, tmp_pos, tmp_pos) ~= "=" then