Culture invariant name validation
MODIFY
src/WebJobs.Script.WebHost/Controllers/FunctionsController.cs
src/WebJobs.Script.WebHost/Controllers/FunctionsController.cs
@@ -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)
{

MODIFY
src/WebJobs.Script/Host/FunctionMetadataManager.cs
src/WebJobs.Script/Host/FunctionMetadataManager.cs
@@ -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;

Culture invariant name validation