You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AS: refuse user information and out-of-range ports in redirect URIs; invalid_client_metadata for post-logout redirect URIs #366
Found by the round-4 and round-6 reviews of PR #361 (#344). Filed rather than fixed there: it changes behaviour in security-sensitive code (CLAUDE.md review procedure).
ClientMetadataValidator.requireValidRedirectUri (openespi-authserver) checks redirect URIs and post-logout redirect URIs for both the admin client API and RFC 7591 /oauth2/register. It accepts any URI whose host java.net.URI parses. Two forms are still accepted that should not be, and one refusal uses the wrong error code:
User information.https://good.example@evil.example/cb is accepted; its real host is evil.example, so it reads like a redirect to good.example. https://user:pw@tp.example/cb stores credentials in the client registration.
Out-of-range ports.java.net.URI does no range check: https://tp.example:0/cb and https://tp.example:99999/cb are accepted.
Error code for post-logout redirect URIs (round 6). A bad post_logout_redirect_uris value is refused with invalid_redirect_uri, but RFC 7591 §3.2.2 defines that code for redirect_uris only. post_logout_redirect_uris is other metadata (OIDC RP-Initiated Logout), so the refusal should be invalid_client_metadata; a client that maps invalid_redirect_uri to its redirect_uris field points at the wrong field.
Proposed change
Refuse a redirect URI (and post-logout redirect URI) with user information (getRawUserInfo() != null), answering 400 with a printable message that does not echo the user information.
Refuse a port outside 1-65535 (no port still means the scheme's default).
Refuse a bad post-logout redirect URI with invalid_client_metadata (e.g. pass the error code into requireValidRedirectUri); the admin API still answers 400 invalid_request. Update the ClientMetadataValidatorTest cases that expect invalid_redirect_uri for post-logout URIs.
Tests under both policies; update OAUTH2_CLIENT_MANAGEMENT_API.md, INTEGRATION_GUIDE.md, openapi.yaml, API_DOCUMENTATION.md.
changed the title [-]AS: refuse user information and out-of-range ports in redirect URIs[/-][+]AS: refuse user information and out-of-range ports in redirect URIs; invalid_client_metadata for post-logout redirect URIs[/+]on Dec 1, 2026
Activity
fix(authserver): #344 review round 4: a redirect URI without a host s…
[-]AS: refuse user information and out-of-range ports in redirect URIs[/-][+]AS: refuse user information and out-of-range ports in redirect URIs; invalid_client_metadata for post-logout redirect URIs[/+]