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:
@@ -358,7 +358,19 @@ local function validate_options(options)
|
|||||||
stdnse.debug1("http: options.cookies[i].max-age should be a string")
|
stdnse.debug1("http: options.cookies[i].max-age should be a string")
|
||||||
bad = true
|
bad = true
|
||||||
end
|
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)
|
stdnse.debug1("http: Unknown field in cookie table: %s", cookie_key)
|
||||||
-- Ignore unrecognized attributes (per RFC 6265, Section 5.2)
|
-- Ignore unrecognized attributes (per RFC 6265, Section 5.2)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user