Skip to content

Commit

Permalink
prevent the usage of colon in feature flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyuanliang-ms committed Oct 18, 2023
1 parent 17d6202 commit 0325751
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public Task<FeatureDefinition> GetFeatureDefinitionAsync(string featureName)
throw new ArgumentNullException(nameof(featureName));
}

if (featureName.Contains(ConfigurationPath.KeyDelimiter))
{
throw new ArgumentException($"The value '{ConfigurationPath.KeyDelimiter}' is not allowed in the feature name.", nameof(featureName));
}

if (Interlocked.Exchange(ref _stale, 0) != 0)
{
_definitions.Clear();
Expand Down

0 comments on commit 0325751

Please sign in to comment.