This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Ensuring the generated redirect URL is valid #903
Closed
Description
In issue #844, @PinpointTownes wrote:
The null ref was in OIDC.
On a related note, we should add more checks to ensure an authorization request or a logout request cannot be generated when the authorization/logout endpoint path resolved from the OIDC configuration or set from the
RedirectToIdentityProvider
event is null.Currently, if the authorization endpoint is undefined, the challenge is applied to the current address (e.g ?response_type=id_token...), which can result in an endless loop. 3 OpenIddict users reported a similar behavior in their own apps.
You can easily reproduce it by cloning the OpenIddict MVC samples and updating the server sample to disable the authorization endpoint:
services.AddOpenIddict<ApplicationUser, IdentityRole<Guid>, ApplicationDbContext, Guid>() // .EnableAuthorizationEndpoint("/connect/authorize") // .EnableLogoutEndpoint("/connect/logout") .EnableTokenEndpoint("/connect/token") // .EnableUserinfoEndpoint("/connect/userinfo") // .AllowAuthorizationCodeFlow() // .AllowRefreshTokenFlow() .AllowPasswordFlow() .DisableHttpsRequirement();