diff --git a/nselib/http.lua b/nselib/http.lua index b1ef97ae8..7c39d1b77 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -358,7 +358,19 @@ local function validate_options(options) stdnse.debug1("http: options.cookies[i].max-age should be a string") bad = true end - elseif not (cookie_key == 'httponly' or cookie_key == 'secure') then + elseif(cookie_key == 'domain') then + if(type(cookie_value) ~= 'string') then + stdnse.debug1("http: options.cookies[i].domain should be a string") + bad = true + end + elseif(cookie_key == 'samesite') then + if(type(cookie_value) ~= 'string') then + stdnse.debug1("http: options.cookies[i].samesite should be a string") + bad = true + end + elseif not (cookie_key == 'httponly' + or cookie_key == 'secure' + or cookie_key == 'partitioned') then stdnse.debug1("http: Unknown field in cookie table: %s", cookie_key) -- Ignore unrecognized attributes (per RFC 6265, Section 5.2) end