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

Fix the HTTPS detection when getting the configuration during install #2651

Merged
merged 2 commits into from Oct 11, 2018

Conversation

Projects
None yet
3 participants
@StijnVrolijk
Contributor

StijnVrolijk commented Oct 11, 2018

Type

  • Non critical bugfix

Resolves the following issues

fixes #2614

Pull request description

Use the HTTPS server variable's existence instead of checking the SERVER_PROTOCOL variable.
See http://php.net/manual/en/reserved.variables.server.php

@StijnVrolijk StijnVrolijk requested review from forkcms/core-contributors Oct 11, 2018

@StijnVrolijk StijnVrolijk added the Bug label Oct 11, 2018

@StijnVrolijk StijnVrolijk added this to the 5.4.1 milestone Oct 11, 2018

'<site-protocol>' => isset($_SERVER['SERVER_PROTOCOL']) ?
(mb_strpos(mb_strtolower($_SERVER['SERVER_PROTOCOL']), 'https') === false ? 'http' : 'https') :
'http',
'<site-protocol>' => isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http',

This comment has been minimized.

@carakas

carakas Oct 11, 2018

Member

https can also contain the text off

Check the value of $_SERVER['HTTPS'] if it's set
From php.net:
Note that when using ISAPI with IIS, the value will be off if the request was not made through the HTTPS protocol.

@carakas carakas merged commit 35842a1 into master Oct 11, 2018

5 checks passed

Scrutinizer 1 updated code elements
Details
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/styleci/push The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@carakas carakas deleted the fix-the-https-setter branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment