mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-05 19:06:44 +00:00
update(userspace): falco webserver must catch json type errors (exceptions)
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
723bc1cabf
commit
c9cd6eebf7
@ -53,7 +53,16 @@ bool k8s_audit_handler::accept_data(falco_engine *engine,
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!engine->parse_k8s_audit_json(j, jevts))
|
||||
bool ok;
|
||||
try
|
||||
{
|
||||
ok = engine->parse_k8s_audit_json(j, jevts);
|
||||
}
|
||||
catch(json::type_error &e)
|
||||
{
|
||||
ok = false;
|
||||
}
|
||||
if(!ok)
|
||||
{
|
||||
errstr = string("Data not recognized as a k8s audit event");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user