mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-28 07:37:32 +00:00
fix(usperspace): webserver must not fail with input that exceeds the expected ranges
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
c9cd6eebf7
commit
8c62ec5472
@ -44,10 +44,16 @@ bool k8s_audit_handler::accept_data(falco_engine *engine,
|
||||
std::list<json_event> jevts;
|
||||
json j;
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
j = json::parse(data);
|
||||
}
|
||||
catch (json::parse_error& e)
|
||||
catch(json::parse_error &e)
|
||||
{
|
||||
errstr = string("Could not parse data: ") + e.what();
|
||||
return false;
|
||||
}
|
||||
catch(json::out_of_range &e)
|
||||
{
|
||||
errstr = string("Could not parse data: ") + e.what();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user