Skip to content

Commit

Permalink
Fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
cataphract committed Oct 4, 2024
1 parent 708dbe4 commit 2c3f99b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions appsec/src/extension/ddappsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,14 @@ __attribute__((visibility("default"))) void dd_appsec_rc_conf(
bool prev_active = DDAPPSEC_G(active);
bool prev_to_be_configured = DDAPPSEC_G(to_be_configured);
_check_enabled();
DDAPPSEC_G(enabled) = prev_enabled;
DDAPPSEC_G(active) = prev_active;
DDAPPSEC_G(to_be_configured) = prev_to_be_configured;

*appsec_features = DDAPPSEC_G(enabled) == APPSEC_ENABLED_VIA_REMCFG;
// only enable ASM / ASM_DD / ASM_DATA if no rules file is specified
*appsec_conf = get_global_DD_APPSEC_RULES()->len == 0;

DDAPPSEC_G(enabled) = prev_enabled;
DDAPPSEC_G(active) = prev_active;
DDAPPSEC_G(to_be_configured) = prev_to_be_configured;
}

static PHP_FUNCTION(datadog_appsec_is_enabled)
Expand Down
2 changes: 1 addition & 1 deletion appsec/src/helper/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// dual-licensed under the Apache-2.0 License or BSD-3-Clause License.
// Unless explicitly stated otherwise all files in this repository are
// dual-licensed under the Apache-2.0 License or BSD-3-Clause License.
//
// This product includes software developed at Datadog
// (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.
Expand Down
2 changes: 1 addition & 1 deletion appsec/src/helper/remote_config/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ client::client(remote_config::settings settings,
ddog_remote_config_reader_drop},
settings_{std::move(settings)}, listeners_{std::move(listeners)}
{
assert(settings.enabled == true); // NOLINT
assert(settings_.enabled == true); // NOLINT

for (auto const &listener : listeners_) {
for (const product p : listener->get_supported_products()) {
Expand Down

0 comments on commit 2c3f99b

Please sign in to comment.