Skip to content

Commit 1d5d4dc

Browse files
prevent usage of colon & target on main branch
1 parent ab6d10f commit 1d5d4dc

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
@@ -56,6 +56,11 @@ public Task<FeatureDefinition> GetFeatureDefinitionAsync(string featureName)
5656
throw new ArgumentNullException(nameof(featureName));
5757
}
5858

59+
if (featureName.Contains(ConfigurationPath.KeyDelimiter))
60+
{
61+
throw new ArgumentException($"The value '{ConfigurationPath.KeyDelimiter}' is not allowed in the feature name.", nameof(featureName));
62+
}
63+
5964
if (Interlocked.Exchange(ref _stale, 0) != 0)
6065
{
6166
_definitions.Clear();

0 commit comments

Comments
 (0)