Skip to content

Commit

Permalink
Merge pull request from GHSA-5rjf-prwh-pp7q
Browse files Browse the repository at this point in the history
* api/v1/traces: validate inputs when enabling traces.

validate the array of inputs when enabling multiple traces that
they are strings.

this patch also refactors out the allocation of said input name.

Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>

* api/v1/traces: disable traces api when tracing is disabled.

Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>

* api/v1/trace: use macros for strings and lengths in responses.

avoid strlen when creating http response, especially in loops,
by predefining them via macros.

Signed-off-by: Phillip Whelan <[email protected]>

* api/v1/trace: use sizeof for string length macros.

Signed-off-by: Phillip Whelan <[email protected]>

* api/v1/trace: use signed lenghts for strings.

this avoid potential integer overflows when using them as
specifiers for format strings.

Signed-off-by: Phillip Whelan <[email protected]>

* api/v1/traces: use macro for inputs string.

Signed-off-by: Phillip Whelan <[email protected]>

* api/v1/traces: use sizeof when comparing against base path.

Signed-off-by: Phillip Whelan <[email protected]>

* api/v1/traces: replace strlen with flb_sds_len when using flb_sds_t.

Signed-off-by: Phillip Whelan <[email protected]>

---------

Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan authored May 15, 2024
1 parent 1252ffa commit 9311b43
Showing 1 changed file with 135 additions and 84 deletions.
Loading

0 comments on commit 9311b43

Please sign in to comment.