From 59f80c31eb63148af36014a86fd10fd2ddd918f5 Mon Sep 17 00:00:00 2001 From: nnposter Date: Sun, 1 Apr 2018 22:47:25 +0000 Subject: [PATCH] Allows parsing of empty attributes in Set-Cookie header. Fixes #1169 --- nselib/http.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index f9dbd3498..c40ab474c 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -778,8 +778,10 @@ parse_set_cookie = function (s) -- Loop over the attributes. while s:sub(pos, pos) == ";" do - pos = pos + 1 - pos = skip_space(s, pos) + -- Skip over empty attributes + repeat + pos = skip_space(s, pos + 1) + until s:sub(pos, pos) ~= ";" if pos > #s then break end