1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Add missing cookie attributes

This commit is contained in:
nnposter
2025-11-01 23:34:30 +00:00
parent f5a3251e97
commit a74125aef5

View File

@@ -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