-
-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative path in ui_url or default_browser_return_url cause runtime crash #1446
Comments
I am not sure that ever worked, are you sure that it worked in v0.5 to have a relative URL for |
We should probably change this in the schema config and only allow URL-URIs to be defined |
I believe I added this to ensure that the login, registration, ... redirects are deterministic and not implicitly set via the e.g. public base URL. This ensures that all redirects end up at the page we configured, and are not dependent on implicit configuration. I think the fix here would be to disallow setting relative URLs in the config schema so that we do not get a runtime error but instead a config validation error. Is there a particular reason why you want to have relative URLs here? Given that it would be computed as such
I see no functional difference to making this explicit. |
The same reason why HTML would allow anchor to support But you are right, for machine, there is no functional difference. It's a just matter of human taste and use case. I thought it was a bug only because the doc mention it was supported and it was supported in the past 😄 . I agree the bottom line is to ensure no runtime error + fix the doc. |
Relative URLs worked in v0.5. This was an important feature for us, for an on-premise application that does not know a reliable hostname when it is deployed, it can be behind a load-balancer for instance with a different DNS name that originally configured, or might be just be IP. Is there a security concern with relative URLs that I'm missing? |
Describe the bug
When
selfservice.default_browser_return_url
orselfservice.flows.XXX.ui_url
is set to be relative path (e.g./foo/bar
), Kratos will crash whenever it access those setting.Reproducing the bug
Steps to reproduce the behavior:
selfservice.flows.login.ui_url
to/login
Server configuration
Just like the demo config:
Expected behavior
It works just like v0.5 or it throws a proper error instead of crashing
Environment
Additional context
The text was updated successfully, but these errors were encountered: