-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
CRM_Utils_System::isSSL - support X_FORWARDED_PROTO to work behind reverse proxy #31473
base: master
Are you sure you want to change the base?
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
So the answer is "Yes" :) I think that makes sense. It feels like we're missing the policy mechanism to say "This app lives behind an SSL proxy" or "This app has SSL on Apache/nginx" or "This app is developmental HTTP site". I know that
IMHO, it would be better if we used some policy flag to affirmatively indicate that the system is or is-not expecting trustworthy proxy headers. But I'm also not looking to block the PR if you're still keen. (F.1: To make a go of it... Maybe, if client starts with HTTP, then a MITM could trick the app-server into thinking that the connection is more secure than it really is. But there's so little point. The fraudulent subrequest would be more convincing if it used real SSL, which it could. This doesn't confer any new access -- it just tweaks the internal-absolute URLs. Or... Maybe there's some scenario where those internal-absolute URLs are passed around -- where you send a legit HTTPS request for yourself but coerce |
Overview
Fixes incorrect SSL detection when running CiviCRM behind a reverse proxy, e.g. with Docker image behind Traefik.
Before
http://
and failAfter
Technical Details
Someone fixed the problem of redirect loops behind a reverse proxy in the
redirectToSSL
function below. I guess there were worries about other callers ofisSSL
- but this feels semantically correct to me.