4489ffb82e
fix(console): accept localhost redirect URIs without path nor port ( #11001 )
...
<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr .
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions .
-->
# Which Problems Are Solved
Some native OIDC applications use localhost without a path as redirect
URI. Currently, setting http://localhost as a redirect URI leads to a
compliance warning (Redirect URIs must begin with your own protocol,
http://127.0.0.1 , http://[::1] or http://localhost .), while
http://localhost/some/path and http://localhost:some-port are accepted).
# How the Problems Are Solved
This PR parses the redirect URI instead of using prefix check to test if
hostname part is localhost, 127.0.0.1 or [::1] (IPv6 addresses are
canonicalized during parsing).
# Additional Context
This PR is a follow-up of https://github.com/zitadel/zitadel/pull/10836 .
Signed-off-by: Yann Soubeyrand <[email protected] >
Co-authored-by: Ramon <[email protected] >
2025-12-30 10:53:04 +01:00
88213d785a
fix(oidc): accept localhost redirect URIs without path nor port ( #10836 )
...
# Which Problems Are Solved
Some native OIDC applications use localhost without a path as redirect
URI. Currently, setting `http://localhost ` as a redirect URI leads to a
compliance warning (`Redirect URIs must begin with your own protocol,
http://127.0.0.1 , http://[::1] or http://localhost .`), while
`http://localhost/some/path ` and `http://localhost:some-port ` are
accepted).
# How the Problems Are Solved
This PR adds additional checks to accept `http://localhost `,
`http://127.0.0.1 `, `http://[::1] ` and `http://[0:0:0:0:0:0:0:1] ` (their
counterpart with port and with path were already accepted).
---------
Co-authored-by: Marco Ardizzone <[email protected] >
2025-10-21 10:10:49 +00:00