Skip to content

Commit 3f98daf

Browse files
committed
Culture invariant name validation
1 parent 9a3f647 commit 3f98daf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/WebJobs.Script.WebHost/Controllers/FunctionsController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class FunctionsController : Controller
3434
private readonly IWebFunctionsManager _functionsManager;
3535
private readonly IWebJobsRouter _webJobsRouter;
3636
private readonly ILogger _logger;
37-
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
37+
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
3838

3939
public FunctionsController(IWebFunctionsManager functionsManager, IWebJobsRouter webJobsRouter, ILoggerFactory loggerFactory)
4040
{

src/WebJobs.Script/Host/FunctionMetadataManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.WebJobs.Script
2121
{
2222
public class FunctionMetadataManager : IFunctionMetadataManager
2323
{
24-
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
24+
private static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
2525
private readonly Dictionary<string, ICollection<string>> _functionErrors = new Dictionary<string, ICollection<string>>();
2626
private readonly Lazy<ImmutableArray<FunctionMetadata>> _metadata;
2727
private readonly IEnumerable<WorkerConfig> _workerConfigs;

0 commit comments

Comments
 (0)