Skip to content

Commit

Permalink
Dev Removed "Force SSL to 'off'" as it makes no sense . It is either …
Browse files Browse the repository at this point in the history
…'on' now or any other string is interpreted as 'not forced'
  • Loading branch information
c-schmitz committed Nov 18, 2019
1 parent 261d253 commit d256bf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/helpers/common_helper.php
Expand Up @@ -3287,13 +3287,14 @@ function SSLRedirect($enforceSSLMode)
*/
function enforceSSLMode()
{
$bForceSSL = ''; // off
$bSSLActive = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off") ||
(isset($_SERVER['HTTP_FORWARDED_PROTO']) && $_SERVER['HTTP_FORWARDED_PROTO'] == "https") ||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https"));
if (Yii::app()->getConfig('ssl_emergency_override') !== true) {
$force_ssl = strtolower(getGlobalSetting('force_ssl'));
$bForceSSL = strtolower(getGlobalSetting('force_ssl'));
}
if ($force_ssl == 'on' && !$bSSLActive) {
if ($bForceSSL == 'on' && !$bSSLActive) {
SSLRedirect('s');
}

Expand Down

0 comments on commit d256bf2

Please sign in to comment.