diff --git a/CHANGELOG b/CHANGELOG index 3a26064c9..0c8ef22ef 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE][GH#731] NSE is now able to process HTTP responses with a Set-Cookie + header that has an extraneous trailing semicolon. [nnposter] + o [Nsock] Handle any and all socket connect errors the same: raise as an Nsock error instead of fatal. This prevents Nmap and Ncat from quitting with "Strange error from connect:" [Daniel Miller] diff --git a/nselib/http.lua b/nselib/http.lua index f1945c7b9..602d68b6f 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -762,6 +762,9 @@ parse_set_cookie = function (s) while s:sub(pos, pos) == ";" do pos = pos + 1 pos = skip_space(s, pos) + if pos > #s then + break + end pos, name = get_token(s, pos) if not name then return nil, string.format("Can't get attribute name of cookie \"%s\".", cookie.name)