Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-git committed Oct 7, 2024
1 parent a3413c5 commit 277cefe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tracer/src/Datadog.Trace/AppSec/Security.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ private ApplyDetails[] UpdateFromRcm(Dictionary<string, List<RemoteConfiguration
{
// store the last config state, clearing any previous state, without deserializing any payloads yet.
var anyChange = _configurationStatus.StoreLastConfigState(configsByProduct, removedConfigs);

var securityStateChange = Enabled != _configurationStatus.EnableAsm;
// normally CanBeToggled should not need a check as asm_features capacity is only sent if AppSec env var is null, but still guards it in case
if (_configurationStatus.IncomingUpdateState.SecurityStateChange && _settings.CanBeToggled)
if (securityStateChange && _settings.CanBeToggled)
{
// disable ASM scenario
if (Enabled && _configurationStatus.EnableAsm == false)
Expand Down Expand Up @@ -239,11 +239,10 @@ private ApplyDetails[] UpdateFromRcm(Dictionary<string, List<RemoteConfiguration
WafRuleFileVersion = updateResult.RuleFileVersion;
}

_configurationStatus.ResetUpdateMarkers();
UpdateActiveAddresses();
}
}

_configurationStatus.ResetUpdateMarkers();
}
catch (Exception e)
{
Expand Down

0 comments on commit 277cefe

Please sign in to comment.