Skip to content
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

http: strict url handling #2359

Closed
Forfold opened this issue May 3, 2022 · 0 comments · Fixed by #2421
Closed

http: strict url handling #2359

Forfold opened this issue May 3, 2022 · 0 comments · Fixed by #2421

Comments

@Forfold
Copy link
Contributor

Forfold commented May 3, 2022

Currently, URLs used for callbacks and validation (e.g., Twilio or auth) are a combination of using General.PublicURL and trying to rebuild the incoming URL from HTTP headers like host, forwarded scheme, and referer.

We should switch to using the public URL for validation and URL generation, with the added ability to override/set the Public URL by a command-line flag, falling back to the DB config value.

This will prevent issues with reverse proxies sending the wrong headers and causing hard to debug problems. We should also update the OIDC code to always issue a redirect to the Public URL instead of relying on the referer & whitelist. With the ability to set a per-instance public URL it will still be possible to achieve what was needed with the whitelist.

Work's been started in the branch strict-url-validation using just the Public URL via command line flag (taking precedence over General.PublicURL) and adding deprecation support to show it as deprecated in the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant