Skip to content

Commit

Permalink
feat(helper): avoid meta compression for fingerprints
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Rulleau <[email protected]>
  • Loading branch information
Leiyks committed Nov 18, 2024
1 parent b51ecd6 commit 218d34b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion appsec/src/helper/subscriber/waf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ void instance::listener::get_meta_and_metrics(

for (const auto &[key, value] : schemas_) {
std::string schema = value;
if (value.length() > max_plain_schema_allowed) {
if (value.length() > max_plain_schema_allowed &&
key.starts_with("_dd.appsec.s")) {

auto encoded = compress(schema);
if (encoded) {
schema = base64_encode(encoded.value(), false);
Expand Down
2 changes: 1 addition & 1 deletion appsec/tests/helper/client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ TEST(ClientTest, RequestShutdownWithAttackAndFingerprint)
EXPECT_EQ(msg_res->triggers.size(), 0);
}

// Request Execution
// Request Shutdown
{
network::request_shutdown::request msg;
msg.data = parameter::map();
Expand Down

0 comments on commit 218d34b

Please sign in to comment.