Skip to content

Commit

Permalink
Prevent usage of ':'
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyca15 authored and Abhilash Arora committed Jan 5, 2021
1 parent 7a54bbc commit b638539
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,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 b638539

Please sign in to comment.