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
Describe the bug
Hi spring-authorization-server gurus,
The localhostvalidation erroneously triggers in the face of the suggested host value 127.0.0.1, ex:
localhost is not allowed for the redirect_uri (http%3A%2F%2F127.0.0.1%3A4200%2Flogin). Use the IP literal (127.0.0.1) instead.
Unfortunately it took unreasonable time to pin down the root cause, as no errors was present in the logs even on TRACE-level and the symptom only manifested itself by caching the error-wrapped request instead of the expected request, ex:
Describe the bug
Hi spring-authorization-server gurus,
The
localhost
validation erroneously triggers in the face of the suggested host value127.0.0.1
, ex:Unfortunately it took unreasonable time to pin down the root cause, as no errors was present in the logs even on TRACE-level and the symptom only manifested itself by caching the error-wrapped request instead of the expected request, ex:
This behavior subsequently breaks the auth-flow, as the user is authenticated at this time but the cached request invalid.
Ie. the auth-flow worked as expected for
redirect_uri
https://oidcdebugger.com/debug , resulting in quite the head scratching and gnashing of teeth :/To Reproduce
authorization_code
client with aredirect_uri
likehttp://127.0.0.1:4200/login
authorization_code
flowNotice how

requestedRedirectHost
isnull
(orange arrows), triggering the first condition on line 598:Expected behavior
The suggested
redirect_uri
host value127.0.0.1
is accepted by the validation.Plus another plea for logging of server-side (validation) errors (see also #159)
Sample
N/A ~ should be possible to prevent regression with unit-test ~ consider also covering a regular IP address.
The text was updated successfully, but these errors were encountered: