mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-29 08:07:24 +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,7 +44,8 @@ bool k8s_audit_handler::accept_data(falco_engine *engine,
|
|||||||
std::list<json_event> jevts;
|
std::list<json_event> jevts;
|
||||||
json j;
|
json j;
|
||||||
|
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
j = json::parse(data);
|
j = json::parse(data);
|
||||||
}
|
}
|
||||||
catch(json::parse_error &e)
|
catch(json::parse_error &e)
|
||||||
@ -52,6 +53,11 @@ bool k8s_audit_handler::accept_data(falco_engine *engine,
|
|||||||
errstr = string("Could not parse data: ") + e.what();
|
errstr = string("Could not parse data: ") + e.what();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
catch(json::out_of_range &e)
|
||||||
|
{
|
||||||
|
errstr = string("Could not parse data: ") + e.what();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool ok;
|
bool ok;
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user