Improve error for invalid use of types as values (addresses #923).

This scripting error can now generate an error message at parse-time
instead of run-time and also includes location information.
This commit is contained in:
Jon Siwek 2012-12-18 14:31:39 -06:00
parent ea6b62f586
commit 2f0c698ed5
4 changed files with 21 additions and 2 deletions

View file

@ -28,7 +28,7 @@ event signature_match(state: signature_state, msg: string, data: string) &priori
if ( /^webapp-/ !in state$sig_id ) return;
local c = state$conn;
local si = Software::Info;
local si: Software::Info;
si = [$name=msg, $unparsed_version=msg, $host=c$id$resp_h, $host_p=c$id$resp_p, $software_type=WEB_APPLICATION];
si$url = build_url_http(c$http);
if ( c$id$resp_h in Software::tracked &&