Skip to content

Commit 143441e

Browse files
jimmyca15Abhilash Arora
authored andcommitted
Prevent usage of ':'
1 parent 7a54bbc commit 143441e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public Task<FeatureDefinition> GetFeatureDefinitionAsync(string featureName)
4747
throw new ArgumentNullException(nameof(featureName));
4848
}
4949

50+
if (featureName.Contains(ConfigurationPath.KeyDelimiter))
51+
{
52+
throw new ArgumentException($"The value '{ConfigurationPath.KeyDelimiter}' is not allowed in the feature name.", nameof(featureName));
53+
}
54+
5055
if (Interlocked.Exchange(ref _stale, 0) != 0)
5156
{
5257
_definitions.Clear();

0 commit comments

Comments
 (0)