Closed vitalyobukhov closed 1 year ago
Apart from not throwing, is your expectation that the dynamic providers middleware would ignore routes like these?
I think there're two paths to improve it:
I'm ok with both. The main point why I raised the issue is that we want to exclude security scans from our logs in a nice way.
PR submitted for this, @vitalyobukhov.
Which version of Duende IdentityServer are you using? 6.1.0
Which version of .NET are you using? net6.0
Describe the bug
Duende.IdentityServer.Hosting.DynamicProviders.DynamicSchemeAuthenticationMiddleware
throwsSystem.ArgumentOutOfRangeException
in case if/scheme
part was not provided within the URI of request.To Reproduce Just plug in the standard IdentityServer via
IdentityServerApplicationBuilderExtensions.UseIdentityServer
within the web app and try to access/federation
path without trailing slash or scheme-specific suffix.Expected behavior No exception - avoid
context.Request.Path.Value.Substring(startIndex + 1)
ifstartIndex >= context.Request.Path.Value.Length
.Log output/exception with stacktrace
Additional context Found it during ISEs 500 triage.