Skip to content

Commit

Permalink
Culture invariant name validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoeger committed Jul 19, 2019
1 parent 9a3f647 commit 3f98daf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class FunctionsController : Controller
private readonly IWebFunctionsManager _functionsManager;
private readonly IWebJobsRouter _webJobsRouter;
private readonly ILogger _logger;
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);

public FunctionsController(IWebFunctionsManager functionsManager, IWebJobsRouter webJobsRouter, ILoggerFactory loggerFactory)
{
Expand Down
2 changes: 1 addition & 1 deletion src/WebJobs.Script/Host/FunctionMetadataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Microsoft.Azure.WebJobs.Script
{
public class FunctionMetadataManager : IFunctionMetadataManager
{
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
private readonly Dictionary<string, ICollection<string>> _functionErrors = new Dictionary<string, ICollection<string>>();
private readonly Lazy<ImmutableArray<FunctionMetadata>> _metadata;
private readonly IEnumerable<WorkerConfig> _workerConfigs;
Expand Down

0 comments on commit 3f98daf

Please sign in to comment.