Adding malformed json sanitation for file change events
Publish PHP Package / docker (push) Successful in 6s
Details
Publish PHP Package / docker (push) Successful in 6s
Details
This commit is contained in:
parent
421d6580dc
commit
c0caa504a9
|
@ -313,6 +313,8 @@ class TaskmanFileChanges
|
||||||
{
|
{
|
||||||
$lines = internal\_extract_lines_from_file($json_or_file);
|
$lines = internal\_extract_lines_from_file($json_or_file);
|
||||||
$json = '[' . implode(',', $lines) . ']';
|
$json = '[' . implode(',', $lines) . ']';
|
||||||
|
//NOTE: adding some sanitization for potentially malformed json
|
||||||
|
$json = str_replace(["\\", "\r\n", "\n"], ["/", "", ""], $json);
|
||||||
}
|
}
|
||||||
|
|
||||||
$decoded = json_decode($json, true);
|
$decoded = json_decode($json, true);
|
||||||
|
|
Loading…
Reference in New Issue