Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
961 stars 604 forks source link

harmonize path comparison #1193

Closed brockallen closed 2 years ago

brockallen commented 4 years ago

In the ASP.NET Core auth handler we have a case-sensitive check like this:

if (context.Request.Path.StartsWithSegments(options.SPOptions.ModulePath, StringComparison.Ordinal))

But in the command factory we have a check like this:

if(commandName.StartsWith("/", StringComparison.OrdinalIgnoreCase))

So perhaps we might want both to be the same? I'd guess case insensitive would be preferred?

explunit commented 4 years ago

HttpModule has ignore case too https://github.com/Sustainsys/Saml2/blob/v2.7.0/Sustainsys.Saml2.HttpModule/Saml2AuthenticationModule.cs#L62