mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Add an error for record coercions that would orphan a field.
These cases should be avoidable by fixing scripts where they occur and they can also help catch typos that would lead to unintentional runtime behavior. Adding this already revealed several scripts where a field in an inlined record was never removed after a code refactor.
This commit is contained in:
parent
ed165f22a2
commit
69afc4a882
8 changed files with 36 additions and 13 deletions
|
@ -73,7 +73,7 @@ event http_message_done(c: connection, is_orig: bool, stat: http_message_stat) &
|
|||
delete c$http$md5_handle;
|
||||
|
||||
NOTICE([$note=MD5, $msg=fmt("%s %s %s", c$id$orig_h, c$http$md5, url),
|
||||
$sub=c$http$md5, $conn=c, $URL=url]);
|
||||
$sub=c$http$md5, $conn=c]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,9 +68,7 @@ event signature_match(state: signature_state, msg: string, data: string) &priori
|
|||
local message = fmt("%s %s %s", msg, c$http$method, url);
|
||||
NOTICE([$note=Incorrect_File_Type,
|
||||
$msg=message,
|
||||
$conn=c,
|
||||
$method=c$http$method,
|
||||
$URL=url]);
|
||||
$conn=c]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue